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

feat(core): transition from native @namespace (conflict) #2624

Merged
merged 10 commits into from
Aug 3, 2022

Conversation

idoros
Copy link
Collaborator

@idoros idoros commented Jul 20, 2022

This PR adds an alternative to @namespace in order to remove conflict with native CSS.

Tasks

  1. move code to st-namespace feature
  2. add @st-namespace atrule
  3. namespace validation:
    • valid (ident-like):
      @st-namespace "dropdown";
      @st-namespace 'dropdown';
      @st-namespace "group-card";
      @st-namespace "MixCapitalization";
    • invalid:
      @st-namespace "http://www.w3.org/1999/xhtml"; <- collect just ident-like
      @st-namespace prefix "http://www.site.com/foo"; <- no prefix
      @st-namespace url(https://www.site.com); <- no url
  4. collect from @namespace for backward compatibility (just when matches validation)
  5. remove native @namespace only if a namespace was generated from it
  6. prefer @st-namespace
  7. change language server to complete @st-namespace instead and add it as a known at-rule
  8. @namespace to @st-namespace code mod

@idoros idoros added feature New syntax feature or behavior core Processing and transforming logic tech debt Updates, upgrades, stale code and work-arounds labels Jul 20, 2022
@idoros idoros self-assigned this Jul 20, 2022
@idoros idoros changed the title feat(core): attempt to avoid native @namespace conflict feat(core): transition from native @namespace (conflict) Jul 23, 2022
@idoros idoros requested a review from barak007 July 31, 2022 09:00
Copy link
Collaborator

@barak007 barak007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final stuff

@idoros idoros force-pushed the ido/stylable-namespace-atrule branch from b5cdfb2 to 51c38ad Compare August 2, 2022 07:28
@idoros idoros merged commit c6d022c into master Aug 3, 2022
@idoros idoros deleted the ido/stylable-namespace-atrule branch August 3, 2022 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Processing and transforming logic feature New syntax feature or behavior tech debt Updates, upgrades, stale code and work-arounds
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants