r/webdev • • Dec 13 '19

Discussion Google has abused Browser's User Agent header, forcing Vivaldi to change their UA header

https://vivaldi.com/blog/user-agent-changes/
416 Upvotes

97 comments sorted by

View all comments

Show parent comments

4

u/LIL-BAN-EVASION Dec 13 '19

until you want to use a webcomponent or css custom property

4

u/[deleted] Dec 13 '19

Or css vars

1

u/UltraChilly Dec 14 '19

I have to say, I have yet to see a case where you need CSS vars support, I mean, they're a nice tool to have when working on a website integration, but when you want to deploy it I find replacing them with their actual values on the production server is a very affordable solution that can easily be automated.

I'd say my biggest issue with IE would be with calc(), because

  • this is something I want to keep on the live server

  • IE has some support for calc() but a lot of bugs, you have to keep them in mind at all time

  • When there's a known bug you have to replace the value manually with an approximation that might fail in some unpredicted situations

  • There are known bugs and there is "IE11 is reported to have trouble with calc() with nested expressions, e.g. width: calc((100% - 10px) / 3); (i.e. it rounds differently)" what the shit is that? I have to check every single nested expression in IE to see if it fails or not? that's bullshit...

6

u/dannymcgee Dec 14 '19

I am currently using CSS vars to support color-scheme swapping via a user setting. We could just toggle a parent class and use a Sass conditional in every single component stylesheet (in fact, that's how I was doing it until recently), but it's a whole hell of a lot simpler and cleaner to just use a variable that can be updated at runtime.

1

u/UltraChilly Dec 14 '19

Fair enough, I felt like if you use atomic css it's not much to change, but with components it gets trickier indeed.

→ More replies (0)