Re: [csswg-drafts] [css-nesting-1] Yet another nesting proposal (Option 5) (#7970)

A few corrections:
1) all of the `&`s in your example except for `&:first-child` are unnecessary, legal, but they are the default behavior.
2) the last `@nest th { {` is also legal, but completely unnecessary. That could simply be `th { text-align: ...}

Remember, in this proposal `@nest` the the thing that contains nested rules, not a nested rule itself (unless it's a second level of nesting).

So it's actually:
```css
@nest table.colortable {
    @nest td {
        {
            text-align: center;
        }
        .c {
            text-transform: uppercase;
        }
        &:first-child,
        &:first-child + td {
            border: 1px solid black;
        }
    }
    th {
        text-align: center;
        background: black;
        color: white;
    }
}```

-- 
GitHub Notification of comment by plinss
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7970#issuecomment-1333294445 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 1 December 2022 06:57:21 UTC