Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Doesn't properly support Composition & Dependencies #2

Closed
goodguyry opened this issue May 1, 2020 · 0 comments · Fixed by #3
Closed

Doesn't properly support Composition & Dependencies #2

goodguyry opened this issue May 1, 2020 · 0 comments · Fixed by #3

Comments

@goodguyry
Copy link
Member

When composing a class, the composed classname is added to the JSON mapping. Because it's one string, the helper functions aren't properly formatting the return values.

I noticed this just now with getComponentSelectors, but I'm sure the others are affected by this oversight as well.

Given the following:

/* theme.css */
.btn {
  border: 1px solid;
  color: red;
}
/* header.css */
.wrapper {
  composes: btn from 'theme.css';
}
{"header":{"wrapper":"header__wrapper___2JY86 theme__btn___2TPiI"}}

The output from getComponentSelectors

const selectors = getComponentSelectors('header');
// '.header__wrapper___2JY86 theme__btn___2TPiI'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant