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

Composes should cascade within a block #475

Open
ramitha opened this issue Aug 11, 2020 · 0 comments
Open

Composes should cascade within a block #475

ramitha opened this issue Aug 11, 2020 · 0 comments
Labels
@css-blocks/core Issue with the core CSS Blocks library
Projects

Comments

@ramitha
Copy link
Contributor

ramitha commented Aug 11, 2020

If we have two classes on the same block that are composing other classes, it should just work. In the code block below, the resolved style should be that of text-body[color=text].

tag.block.scss

:scope {
  composes: 'text-body[color=text-on-dark]', 'text-body[size=small]';
  border-radius: token('corner-radius-small');
  padding: token('spacing-half-x') token('spacing-one-x');
}

// types
:scope[type=enabled] {
  composes: 'text-body[color=text]';
  background-color: token('color-background-none-active');
}

text-body.block.scss

/ defaults
:scope {
  font-size: token('font-size-medium');
  line-height: token('line-height-default');
  font-weight: token('font-weight-regular');
  color: token('color-text');
}

:scope[size=small] {
  font-size: token('font-size-small');
}

:scope {
  @include text-color('text');
  @include text-color('text-low-emphasis');
  @include text-color('action');
  @include text-color('signal-positive');
  @include text-color('signal-negative');
  @include text-color('signal-neutral');
  @include text-color('text-on-dark');
}
@ramitha ramitha added the @css-blocks/core Issue with the core CSS Blocks library label Aug 11, 2020
@chriseppstein chriseppstein added this to To Do in LinkedIn GA Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@css-blocks/core Issue with the core CSS Blocks library
Projects
LinkedIn GA
  
To Do
Development

No branches or pull requests

1 participant