Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDEA] Apply :where() on all of the tiddlywiki styles to ensure the lowest specifity possible / avoid clash with user customisation #8591

Open
Telumire opened this issue Sep 10, 2024 · 2 comments

Comments

@Telumire
Copy link
Contributor

The :where() pseudo-class is used in https://open-props.style/ , a CSS framework created by Adam Argyle. In this video, he explain why this is useful: https://youtube.com/clip/UgkxF9g6_f5DbO4jP26dUpN9gqpHzCS3XYqN?si=ktxEvM0ZEhBfisEc

In summary, this gives the selectors a specificity of 0; which means that they can be overridden very easily.
Currently, caniuse indicate a global usage of 93.34%. The MDN doc mark this feature as "Baseline - Widely available : This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2021".

Is this support sufficient or should we wait a few years before using this feature ?

@Jermolene
Copy link
Member

Hi @Telumire we generally leave it a bit longer before adopting a new feature of the web platform. For example, I think the latest JS features we use are from ECMAScript 2018. A big factor is whether the new feature allows graceful degradation. For example, a new CSS property that is not recognised by older browsers would not be considered a huge problem. But something like :where() would require TW's CSS to be rewritten in a way that would no longer work with older browsers.

@Telumire
Copy link
Contributor Author

Hi @Jermolene, I apologize for bringing this up again—I now recall that there has been similar discussion in the past: #8075 (comment)

Would it be possible to add a tiddler on TiddlyWiki.com to outline the official stance on CSS, JS, and HTML support? Perhaps something like: “Web platform features adopted by the core must have been released at least four years prior, except for progressive enhancements—features that enhance user experience while allowing graceful degradation if unsupported.”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants