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

fix(core): st-mixin feature overall #2398

Merged
merged 25 commits into from
Apr 24, 2022
Merged

Conversation

idoros
Copy link
Collaborator

@idoros idoros commented Mar 21, 2022

fix

  • mixin selector within nested selector: :is(.mix) not included in mixin: playground
  • mixin root out of order: playground
  • mixin root specificity modifies root specificity result: playground
  • root mixin attach :global() without the mixin anchor: playground
  • crash when mixin Root alias with custom element selector: playground
  • @keyframes are copied with root mixin and namespaced to mixin - should either namespace according to mixed-in sheet or reference the mixin origin: playground
  • JS mixin should namespace animation-name according to available symbols (from JS context? target context?): playground
  • when there are valid -st-partial-mixin and -st-mixin with decls between them, the last mixin decl location is used as an insertion for both: playground
  • report and filter mixin of rules/atrules into @keyframes states: playground
  • reported in issue #2154, mixed-in class with -st-global doesn't register the to meta.globals: playground
  • reported in issue #372, mixin of imported aliased element reports "unknown mixin": playground
  • reported in issue #1203, the JS mixin behavior differ on whether explicit or implicit parenthesis exist and on whether arguments are passed or not: playground
  • local alias mix doesn't mix imported CSS: playground

refactor

  • processor

    • analyzeDeclaration - move definition/validation to feature
  • transform

    • transformLastPass - move mixin append to feature hook

deprecate

  • remove internal SRule.mixins usage

test

  • move tests to st-mixin.spec and convert to new format
  • add missing tests

- feature file
- moved mixin symbol to feature
- initialized feature in meta
@idoros idoros added core Processing and transforming logic tech debt Updates, upgrades, stale code and work-arounds labels Mar 21, 2022
@idoros idoros self-assigned this Mar 21, 2022
- move mixin analyze to `analyzeDeclaration`
- move parsers from `stylable-value-parsers` to `helpers/mixin`
- move `valueMapping` of mixins from `stylable-value-parsers` to feature `MixinType`
- remove `valueParserWarning` from core index
- add `features/st-mixin.spec`
- move, change to new test format in to related feature specs
- wrap deprecated usage in `filterPartialMixinDecl` with ignoreDeprecationWarn
- remove regression test related to `inheritedMeta` that is no longer used
@idoros idoros changed the title refactor(core): mixin feature extraction fix(core): st-mixin feature overall Apr 5, 2022
packages/core/src/features/st-import.ts Show resolved Hide resolved
packages/core/src/features/st-import.ts Show resolved Hide resolved
packages/core/src/stylable-meta.ts Outdated Show resolved Hide resolved
packages/core/src/stylable-transformer.ts Outdated Show resolved Hide resolved
packages/core/src/stylable-utils.ts Show resolved Hide resolved
packages/core/src/stylable-value-parsers.ts Show resolved Hide resolved
packages/core/src/stylable-value-parsers.ts Show resolved Hide resolved
packages/core/test/helpers/rule.spec.ts Show resolved Hide resolved
@idoros idoros merged commit 24d8192 into master Apr 24, 2022
@idoros idoros deleted the ido/mixin-feature-extraction branch April 24, 2022 12:28
@idoros idoros mentioned this pull request Apr 28, 2022
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Processing and transforming logic 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