Skip to content

Reusing css file puts duplicate styles in <head> #99

Open
@timwis

Description

@timwis

I have a few components that are similar and I'd like to share styles between rather than copying & pasting the styles into each component. So I put the shared styles into a .css file and imported them into each component via sf('path/to/styles.css'). Fortunately sheetify seems to know it's the same file so it uses the same class name for both components. But it still puts the contents of the .css file into the <head><style> tag twice:

screen shot 2016-10-07 at 06 53 57

Is that expected behaviour? Is there a better way to accomplish what I'm trying to do? The only other thing I can think of is to put the css on the parent element, but that feels like unnecessary coupling. Or use insert-css to just add css like olden times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions