You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could be totally wrong, or wrong on the intent of the current code, but I think there might be 2 small bugs that lead to over-eager browser prefixing.
Agent equality does not include the agent name, so the Subject support maps are immediately reduced by many key collisions upon construction
Transform.prefix looks up the relevant prefixes in a lossy way (by reducing both the lookup map and the key in question to their prefixes instead of holding on to their Agents) that computes the need for more prefixes than necessary
Because the current code looks up pp0 based on all possible Agents. Then it uses e.prefixWhitelist which is the (lossy) set of all prefixes aka engines (e.g. webkit) collapsed across all Agents for this platform, to filter down the list of all possible Agents from pp0, based on their prefixes aka engines. This lossy lookup means that extra browser prefixes will be emitted even with the Platform does not intend to support a specific Agent, but because that non-supported Agent shares a prefix with another Agent that DOES NOT support the feature in question, we calculate that the intendedAgent also does not support that feature even if it does.
The text was updated successfully, but these errors were encountered:
I could be totally wrong, or wrong on the intent of the current code, but I think there might be 2 small bugs that lead to over-eager browser prefixing.
Agent
equality does not include the agent name, so theSubject
support maps are immediately reduced by many key collisions upon constructionTransform.prefix
looks up the relevant prefixes in a lossy way (by reducing both the lookup map and the key in question to their prefixes instead of holding on to theirAgent
s) that computes the need for more prefixes than necessaryOne (possibly wrong) way to fix is:
Fix (1)
scalacss/core/shared/src/main/scala/scalacss/internal/CanIUse.scala
Line 43 in 08e74bc
Alter ^ this definition to include the agent name e.g.:
final case class Agent(name: String, prefix: Prefix, prefixExceptions: Map[VerStr, Prefix])
which is accomplished by changing the generator code here:
scalacss/misc/caniuse.scala
Line 315 in 689b5bc
as well as the generated instances here:
scalacss/misc/caniuse.scala
Line 256 in 689b5bc
Fix (2)
Change
scalacss/core/shared/src/main/scala/scalacss/internal/Attr.scala
Lines 122 to 129 in 08e74bc
to
Because the current code looks up
pp0
based on all possibleAgent
s. Then it usese.prefixWhitelist
which is the (lossy) set of all prefixes aka engines (e.g. webkit) collapsed across allAgent
s for this platform, to filter down the list of all possibleAgent
s from pp0, based on their prefixes aka engines. This lossy lookup means that extra browser prefixes will be emitted even with thePlatform
does not intend to support a specificAgent
, but because that non-supportedAgent
shares a prefix with anotherAgent
that DOES NOT support the feature in question, we calculate that the intendedAgent
also does not support that feature even if it does.The text was updated successfully, but these errors were encountered: