Commit graph

71 commits

Author SHA1 Message Date
Simon Sapin
4993a80074 Introduce a style::values::CustomIdent type 2017-04-26 13:02:14 +09:00
Ravi Shankar
0249270f61 Create a module for generics and make BorderRadiusSize generic 2017-04-25 17:13:41 +05:30
Ravi Shankar
76df67fc7b Add add_impls_for_keyword_enum macro for implementing necessary traits 2017-04-13 15:27:13 +05:30
Manish Goregaokar
9dbbb97ddd stylo: Use prefixed values in ExtremumLength 2017-04-12 12:02:12 +08:00
Xidorn Quan
0d556ddbf0 Add a predefined integer type 2017-03-17 23:07:57 +11:00
Simon Sapin
0f2d000a23 Borrow input to match_ignore_ascii_case!
In cssparser version 0.11, this macro will stop implicitly borrowing its
own input.
2017-02-26 10:40:09 +01:00
bors-servo
26de7c6bc4 Auto merge of #14740 - glasserc:extremum-length, r=Manishearth
Add support for keyword values for min-width and max-width

This is a follow-up to #14432 which got closed and can no longer be re-opened.

This PR aims to add support for keyword-values max-content, min-content, fit-content, and fill-available to the properties that use them, namely min-width, min-height, max-width, and max-height.

It's still untested because I still haven't figured out how to do that. I guess I should write or find some web page that uses these properties.

Refs #13821.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13821  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/14740)
<!-- Reviewable:end -->
2017-02-24 14:08:58 -08:00
Ethan Glasser-Camp
76de979231 Implement a MinLength type
Implement an ExtremumLength type which contains all the enumerated
keyword values for min-width, min-height, max-width, and
max-height. Then, implement a MinLength which can be used for min-width
and min-height. So far this just maps to Gecko values.

Refs #13821.
2017-02-23 16:28:26 -05:00
Anthony Ramine
8a8ee2888c Remove rustc-serialize from style and style_traits 2017-02-23 21:47:23 +01:00
Nazım Can Altınova
78afe2b8d1 Box larger specified values to avoid memmove impact 2017-02-09 11:10:08 +01:00
Nazım Can Altınova
abc40f61c0 Replace NoViewportPercentage with a macro 2017-02-09 10:41:16 +01:00
Alberto Leal
09d4751054 Refactor outline-style to accept "auto" value in addition to border-style values.
Fixes https://github.com/servo/servo/issues/15207
2017-02-08 23:13:20 -05:00
Emilio Cobos Álvarez
f37aa12927
style: Prevent more missing docs in the values module. 2016-12-31 12:17:02 +01:00
Emilio Cobos Álvarez
277ef70d39
style: Consistently indent stuff, add a bit of documentation driving by. 2016-12-31 12:16:57 +01:00
Ravi Shankar
dee1a65a69 Use the ParserContext along with Parser in the parse function 2016-11-27 08:49:20 +05:30
Artem Biryukov
9564673b5a Fix related to #14101
Add Parse trait implementation for some structures
2016-11-12 05:26:15 +03:00
Ravi Shankar
5df250bc05 Add unit structs for representing keywords: auto, none, normal 2016-11-09 13:04:24 +05:30
Ravi Shankar
f36a573d2d Add an Either<A, B> type for sharing specified and computed CSS types 2016-11-09 13:04:17 +05:30
Ravi Shankar
6061985898 Prefer Servo-specific ToCss for all types 2016-11-07 09:14:22 +05:30
Ravi Shankar
5dbc8d02c9 Move Servo-specific ToCss to style_traits 2016-11-07 00:00:28 +05:30
Manish Goregaokar
149246e96a
style: Split values.rs into specified/computed module files 2016-07-29 18:43:42 +05:30