summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Properties.json
AgeCommit message (Collapse)Author
2021-11-10LibWeb: Combine background-repeat-x/y pseudo-propertiesSam Atkins
While right now this doesn't save much complexity, it will do once we care about multiple background layers per node. Then, having a single repeat value per layer will simplify things. It also means we can remove the pseudo-property concept entirely! :^)
2021-11-10LibWeb: Parse `background-clip` and `background-origin`Sam Atkins
Including as part of the `background` shorthand. :^)
2021-10-15LibWeb: Parse "none" value for box-shadow propertySam Atkins
Previously, `box-shadow: none` would fail to parse, meaning that in this example: ```css p { box-shadow: 20px 10px 5px magenta; } p.foo { box-shadow: none; } ``` ... a `<p class="foo">` would still have a box-shadow, when it should not have one. Now, we handle the `none` value. :^)
2021-10-09LibWeb: Add initial version of pointer-events CSS propertyhuwdp
2021-09-23LibWeb: Add range-checking to property_accepts_value()Sam Atkins
For `number` and `integer` types, you can add a range afterwards to add a range check, using similar syntax to that used in the CSS specs. For example: ```json "font-weight": { ... "valid-types": [ "number [1,1000]" ], ... } ``` This limits any numbers to the range `1 <= n <= 1000`.
2021-09-23LibWeb: Add valid-value information to Properties.jsonSam Atkins
2021-09-18LibWeb: Add transform property to the systemTobias Christiansen
This patch adds parsing support as well as all the needed stuctures all over LibWeb to pass Transformations around.
2021-09-17LibWeb: Correct some initial values and add missing onesSam Atkins
- The `text-decoration-foo` values now match the spec. - Added values for `border-foo` since those are needed soon. - Make `color`'s initial value be `-libweb-palette-base-text`.
2021-09-17LibWeb: Make "currentcolor" lowercase in Properties.jsonSam Atkins
It's technically case-insensitive, but the spec always defines it as "currentcolor" so it feels wrong to capitalise it differently there.
2021-09-16LibWeb: Add for CSS `fill/stroke/stroke-color` properties for SVGSam Atkins
In the spec, `fill` and `stroke` are supposed to be a shorthands for various properties. But since the spec is still a working draft, and neither Firefox or Chrome support the `fill-color` or `stroke-color` properties, we'll stick with `fill` and `stroke` as simple colors for now. Also, note that SVG expects things in "user units", and we are assuming that 1px = 1 user unit for now.
2021-09-13LibWeb: Add handful of CSS properties and identifiersAndreas Kling
This is just to make the CSS parser stop whining when it encounters some very common properties and identifiers. More work will be required to actually support these things. :^)
2021-09-12LibWeb: Add CSS quirks information to Properties.jsonSam Atkins
Two CSS quirks are specced to only apply to specific properties: - The hashless hex color quirk https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk - The unitless length quirk https://quirks.spec.whatwg.org/#the-unitless-length-quirk These are now represented in `Properties.json` like so: ```json "property-name-here": { "quirks": [ "hashless-hex-color", "unitless-length" ] } ``` Every property that either of those two quirks applies to is included in `Properties.json` and now has their quirks listed. :^)
2021-08-26LibWeb: Correct CSS initial values for min-width and min-heightAndreas Kling
The initial value for these is auto, not 0.
2021-08-25LibWeb: Quote all initial values in Properties.jsonSam Atkins
This is in preparation for parsing these into StyleValues automatically. Having them all be Strings makes the generation code simpler.
2021-08-16LibWeb: Replace is_inherited_property() with generated codeSam Atkins
We already include the inheritance for each property in Properties.json, so made sense to use that instead of a list in StyleResolver. Added `inherited: true` to a couple of properties to match the previous code's behavior. One of those had a FIXME which I've moved to the JSON file, which is hacky, but it works.
2021-08-14LibWeb: Correct initial values for flex CSS propertiesSam Atkins
`flex-basis` and `flex-shrink` had different default values than are dictated in the spec.
2021-07-24LibWeb: Add box-shadow as a known ValueIDTobias Christiansen
2021-07-24LibWeb: Parse and store the opacity propertyEgor Ananyin
2021-07-19LibWeb: Add parsing for the justify-content propertyTobias Christiansen
2021-06-06LibWeb: Parse and resolve flex: shorthandTobias Christiansen
2021-06-06LibWeb: Add flex-grow and flex-shrinkTobias Christiansen
They get parsed and are available to the programmer of Layouts :^)
2021-06-06LibWeb: Parse flex-basisTobias Christiansen
Flex-basis accepts either 'content' or a Length.
2021-06-06LibWeb: Parse and resolve flex-flow propertyTobias Christiansen
2021-06-06LibWeb: Add parsing for flex-wrap propertyTobias Christiansen
2021-05-20LibWeb: Add border-radius to the CSS-parserTobias Christiansen
And resolve the shorthands.
2021-04-13LibWeb: Start parsing font propertyEgor Ananyin
2021-04-05LibWeb: Support two-value background-repeatTimothy Flynn
The background-repeat value may be specified as either one- or two-value identifiers (to be interpreted as horizontal and vertical repeat). This adds two pseudo-properties, background-repeat-x and background-repeat-y, to handle this. One-value identifiers are mapped to two-value in accordance with the spec.
2021-02-22LibWeb: Add parsing and application of CSS "overflow" propertyAndreas Kling
We don't actually do anything with the values yet, but now they are available for layout nodes once we are ready to implement them.
2021-01-18LibWeb: Parse the CSS "flex-direction" propertyAndreas Kling
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling