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

Deprecate stylable usage of native @namespace #2648

Open
idoros opened this issue Aug 8, 2022 · 0 comments
Open

Deprecate stylable usage of native @namespace #2648

idoros opened this issue Aug 8, 2022 · 0 comments
Labels
deprecated Removed feature or API next-major Issues or PR related to the next major version

Comments

@idoros
Copy link
Collaborator

idoros commented Aug 8, 2022

Currently Stylable uses CSS @namespace at-rule definition as a build time requested namespace value config (overrides the filename as namespace default).

We moved to @st-namespace for the purpose of not conflicting with CSS in #2624 , but for backwards compatibility, Stylable still pickup the value and remove the definition at build,

This behavior should stop at version 6

If you use @namespace

To config Stylable:

  • Make sure it is actually necessary - in most cases the default filename should suffice
  • If you get filename namespace conflicts - use namespaceResolver config to control a project namespace strategy
  • For future v6 compatibility, replace with @st-namespace (there is a codemod for that)

As it's native intent (namespace a stylesheet rules at runtime)

  • use a namespace containing ascii characters that don't match [a-zA-Z-_], like "http://www.w3.org/1999/xhtml"
  • use a prefix: @namespace prefix "value"
@idoros idoros added deprecated Removed feature or API next-major Issues or PR related to the next major version labels Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated Removed feature or API next-major Issues or PR related to the next major version
Projects
None yet
Development

No branches or pull requests

1 participant