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

Information: apply display flex #7

Open
tiagoboeing opened this issue Sep 4, 2020 · 2 comments
Open

Information: apply display flex #7

tiagoboeing opened this issue Sep 4, 2020 · 2 comments

Comments

@tiagoboeing
Copy link

I'm using display: flex and appear not apply on elements.

Code example

const StyledIcon = styled.span`
  display: flex;
`;

Using div or span whethever, the result is the same.

My component

    return (
      <Host>
        <StyledIcon>
          <div>Column 1</div>
          <div>Column 2</div>
        </StyledIcon>
      </Host>
    );

Preview

image

For tests, adding display: flex; on dynamic created element

image

@MMT-LD
Copy link

MMT-LD commented Sep 8, 2020

@tiagoboeing looking at your code this is because you are using shadow: true. Try scoped: true or remove. This lib extracts the css to document head. Using shadow: true encapsulates your styles, hence why its not picking them up

@tiagoboeing
Copy link
Author

Using scoped: true works, but a very important resource is losted, the Shadow DOM. Using scoped makes the main application can be override styles from web components and classes can be conflict. 😥

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

2 participants