Skip to content

Don't differentiate between host and non-host  #98

Description

@Briix

Would be really nice to get rid of the special :host selector, so prefixed styles could be used in host and non-hosts element without having to apply specific styles to :host.

Activity

  1. yoshuawuyts commented on Oct 5, 2016

    @yoshuawuyts
    Contributor

    Yeah I'd be keen for this, as it allows us to define non-prefixed styles inline. Given that I'm using tachyons nowadays I don't really use prefixing anymore anyway, and the humans I've seen write prefixed tachyons tend to use :host anyway. 👍 from me!

  2. ahdinosaur commented on Oct 26, 2016

    @ahdinosaur
    Member

    hey @Briix. i'm not sure i understand, is it possible for you to describe more detail with maybe an example?

  3. Briix commented on Nov 4, 2016

    @Briix
    Author

    @ahdinosaur Sorry for the really slow response!
    Originally :host seemed like an unnecessary selector to me, but I'm actually not so sure anymore.
    It was mainly because I've mostly seen sheetify used in two ways:

    • to create inline styles, thus using the :host selector
    • to create additional styles with selectors or classes

    The :host selector doesn't make a lot of sense to me in both of those scenarios. My main frustration was when I wanted to add some additional atomic classes, like .padding-5vh etc and then applying those to divs. If I want to apply this to the top level div I have to "prefix" it with :host like so: :host.padding-5vh.

    I have played around with it some more however, and the above scenario seems to be easily avoided by just adding an outer div the style is applied to.

    So it hasn't been as big of a hassle as I originally thought it would be and I can see arguments for keeping/removing it, so I would definitely love some more input and thoughts on it :-)

  4. yoshuawuyts commented on Nov 6, 2016

    @yoshuawuyts
    Contributor

    I think this might be a reasonable resolution: stackcss/postcss-prefix#9

  5. yoshuawuyts commented on Nov 16, 2016

    @yoshuawuyts
    Contributor

    Closed in v6.0.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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