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

CSS file is created with extra {} for comments when using :global #243

Open
fenglish opened this issue Jan 30, 2019 · 0 comments
Open

CSS file is created with extra {} for comments when using :global #243

fenglish opened this issue Jan 30, 2019 · 0 comments

Comments

@fenglish
Copy link
Contributor

fenglish commented Jan 30, 2019

Some x-dash components use :global to import other x-dash component styling.

e.g.
x-topic-search and x-teaser-timeline

If the imported CSS file includes comments, CSS file is created with extra {} for the comments. The consumer side throws an error about the invalid CSS.

@financial-times/x-follow-button/dist/FollowButton.css

/* Button.scss */
/* Mixins: are going to be reused across various components */
.main_button__3Mk67 {
  background-color: transparent;
}

x-topic-search scss file

:global {
	@import "~@financial-times/x-follow-button/dist/FollowButton";
}

⬇️ ⬇️ ⬇️ ⬇️

x-topic-search css file

{
  /* Button.scss */
  /* Mixins: are going to be reused across various components */ }

.main_button__3Mk67 {
    background-color: transparent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant