Repository navigation
style: Derive more stuff - #19186
style: Derive more stuff#19186
Conversation
|
Heads up! This PR modifies the following files:
|
|
r? @nox |
|
@bors-servo try |
style: Derive more stuff <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19186) <!-- Reviewable:end -->
|
💔 Test failed - linux-rel-wpt |
1f80008 to
950c7ca
Compare
|
@bors-servo try
|
style: Derive more stuff <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19186) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
nox
left a comment
There was a problem hiding this comment.
Very neat, but I have a few nits.
| /// | ||
| /// Should only be serialized by presentation attributes, so even though | ||
| /// serialization for this would look the same as for the `Relative` | ||
| /// variant, it is unexposed, so no big deal. |
There was a problem hiding this comment.
Maybe add #[css(function)] and name it ServoAbsolute or something, so that it serialises to -servo-absolute? At least if it ever leak outside we will know what's happening.
There was a problem hiding this comment.
Done (with -moz-absolute since this is moz-only anyway).
| #[css(function)] | ||
| Stylistic(CustomIdent), | ||
| /// Enables display with stylistic sets | ||
| #[css(comma, function, iterable)] |
There was a problem hiding this comment.
Document #[css(iterable)] in the ToCss docs.
| /// | ||
| /// <https://drafts.csswg.org/css-values/#viewport-relative-lengths> | ||
| #[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToCss)] | ||
| #[css(dimension)] |
There was a problem hiding this comment.
Please make it such that this attribute go on the dimension variants, not on the type itself. CSS doesn't say that things that use dimensions should always use dimensions.
Also, document it in ToCss.
For css(dimension), it'd be nice to derive(Parse) too, I think...
950c7ca to
b750f70
Compare
|
Ammended, mind-re-reviewing @nox? Thanks! |
|
@bors-servo r+ |
|
📌 Commit b750f70 has been approved by |
style: Derive more stuff <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19186) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
This change is