The difference is the selector: .header vs. .Header_dgh465 .header vs. [class^="Header_"]
-
-
Replying to @mxstbr @tjholowaychuk
right, but that's effort that most people aren't going to go to. No-one at Twitter has 'make Twitter easier to scrape' on their TODO list —
2 replies 0 retweets 3 likes -
and therein lies the problem. The web used to be friendly to this stuff by default, but modern tooling means it has to be a conscious effort
6 replies 0 retweets 7 likes -
Some Google toolchains rename classes by default because (1) performance (shorter names) & (2) obfuscation are requirements on the todo list
1 reply 0 retweets 1 like -
Replying to @theefer @Rich_Harris and
Note that's using "normal css" (or gss/sass), not css-in-js.
1 reply 0 retweets 1 like -
If you're *required* to obfuscate that's a whole 'nother matter. Am sceptical about the perf thing — after gzip, we're probably talking
1 reply 0 retweets 0 likes -
Replying to @Rich_Harris @theefer and
about miniscule byte gains, no? and the length of a class name surely doesn't affect the CSSOM?
1 reply 0 retweets 0 likes -
I'll see if I can compare payloads with renaming vs without, both pre and post gzip.
2 replies 0 retweets 0 likes -
Replying to @theefer @Rich_Harris and
Intuitively would expect all class names would need to reside in memory at least once per name, but IANA browser engineer /cc
@slightlylate1 reply 0 retweets 0 likes -
I mean, unless your classnames alone run into the 100's of Kbs then it seems unlikely to matter... but IAANABE
1 reply 0 retweets 0 likes
Style resolution is a lot of string comparison. Shorter strings == faster comparisons. But what's even faster is local (scoped) styles.
-
-
Replying to @slightlylate @Rich_Harris and
So the pro-move is to use Shadow DOM and scope your CSS to your component.
1 reply 0 retweets 4 likes - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.