Skip to content

support for /deep/ and ::shadow #2023

Closed

Description

@Pomax

With custom elements landed in Chrome beta and shadow dom in Chrome stable, the need for ::shadow and /deep/ syntax is becoming real. I don't like the /deep/ syntax, it's ugly as sin, but also rather important for overriding styling inside a shadow dom element, and right now less crashes when it encounters it, so: feature request for ::shadow and /deep/ support =)

Activity

  1. seven-phases-max commented on May 20, 2014

    @seven-phases-max
    Member

    ::shadow is already supported (as well as any other ::identifier and :identifier(identifier) stuff).
    /deep/ support may be too early since it's actually a combinator and most likely they will change it to something like >> or >>> (for example earlier ^ and ^^ support has been added and now where are these draft combinators? Gone :). And meanwhile it's always possible to generate whatever selector characters by escaping:

    @deep: ~'/deep/';
    x-foo @{deep} span {
        // ...
    }
    

    I guess there's nothing wrong with supporting a draft CSS feature in Less but not when the feature changes too often (yet).

  2. Pomax commented on May 20, 2014

    @Pomax
    Author

    except Chrome just landed shadow DOM in stable (not just canary/beta), and requires the /deep/ syntax to style things across the shadow boundary (based on the discussion I'm hearing from the Polymer guys, this is the official CSS syntax for deep styling).

    Definitely giving that escaping solution a try though.

  3. seven-phases-max commented on May 20, 2014

    @seven-phases-max
    Member

    I don't like the /deep/ syntax,

    Yeah, now waiting for the /high/ combinator.

  4. ryanwatkins commented on Jul 16, 2014

    @ryanwatkins

    Two more months now, as pointed out its in Chrome Stable, and used by Polymer, which got a good deal of focus at Google IO with their heavy push to Material Design. They work in SASS https://groups.google.com/d/msg/polymer-dev/MMa1SyezpfI/ZEytHHIJ6Z0J

  5. lukeapage commented on Jul 27, 2014

    @lukeapage
    Member

    it shouldn't be too hard to add as a combinator, I'll keep this on my radar for when I have time

  6. lukeapage commented on Aug 14, 2014

    @lukeapage
    Member

    I'm doing now. I found we support

    .a ^ .b,
    .a ^^ .b {
    }
    

    was that an old syntax or is that nothing to do with shadow dom?

  7. lukeapage commented on Aug 14, 2014

    @lukeapage
    Member

    Also, I presume when compressed spaces aren't required?

    .a/deep/.b {
    }
    

    is valid?

  8. seven-phases-max commented on Aug 14, 2014

    @seven-phases-max
    Member

    Yes, ^^ is the old syntax and we don't need to support it anymore (and ^ too if I'm not mistaken).

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions