summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Properties.json
AgeCommit message (Collapse)Author
2023-01-03LibWeb: Parse `border-collapse` property for HTML tablemartinfalisse
2022-12-31LibWeb: Mark the border-style properties as layout affectingLuke Wilde
`border-style: none` and `border-style: hidden` remove the border entirely during layout, causing boxes to shift around.
2022-11-07LibWeb: Parse CSS gap propertymartinfalisse
Including the legacy grid-gap, grid-column-gap and grid-row-gap properties.
2022-10-24LibWeb: Establish stacking context when backdrop-filter is not 'none'Luke Wilde
2022-10-14LibWeb: Parse the CSS align-content propertyAndreas Kling
2022-09-16LibWeb+Meta: Parse the `backdrop-filter` CSS propertyMacDue
Note: The parsing and style value completely ignores the SVG filters part of the spec for now... That's a yak for another day :^)
2022-08-25LibWeb: Parse grid-column and grid-row CSS valuesmartinfalisse
2022-08-25LibWeb: Parse grid-column-start and related CSS propertiesmartinfalisse
Parse grid-column-start, end, and the equivalent for rows.
2022-08-25LibWeb: Parse grid-template-columns and grid-template-rowsmartinfalisse
Add functionality to begin parsing grid-template-columns and grid-template-rows. There are still things to be added, like parsing functions, but I would say a couple of the major points are already adressed like length, percentage, and flexible-length.
2022-08-25LibWeb: Parse grid display valuemartinfalisse
2022-08-07LibWeb: Parse rect style valueTom
Add ability to parse a rect when it is used as the value of a style property.
2022-07-23LibWeb: Implement `appearance` CSS propertyMacDue
This includes the "compat" values even though they are not strictly necessary.
2022-07-21LibWeb: Mark `transform` property as affecting stacking contextsSam Atkins
2022-07-19LibWeb: Reject negative values for `flex-grow` and `flex-shrink`Andreas Kling
2022-07-12LibWeb: Honor `align-self` over `align-items` when non-auto on flex itemAndreas Kling
2022-04-14LibWeb: Use generated enum code for property value validationSam Atkins
This has the nice benefit of removing a lot of duplicated lists of values from Properties.json. :^)
2022-04-02LibWeb: Implement the flex order CSS propertyEnver Balalic
Adds support for the flex order property and a test page for it on the browser welcome page.
2022-03-26LibWeb: Assign limits to CSS properties that cannot be negativeSam Atkins
I believe this is all of them, but I may have missed some. Several properties technically do not allow negative numbers but the description says to accept these as valid, and then clamp them afterwards to the desired range. As such, we don't reject them during parsing.
2022-03-24LibWeb: Parse and compute text-shadow propertySam Atkins
2022-03-22LibWeb: Allow percentages in word/letter-spacing propertiesSam Atkins
This is a change to CSS-TEXT-4, listed here: https://www.w3.org/TR/2022/WD-css-text-4-20220318/#changes We don't actually support these properties yet, but it doesn't hurt to keep them up to date for when they get implemented in the future. :^)
2022-03-22LibWeb: Parse the CSS transform-origin propertySimon Wanner
This is almost a PositionStyleValue, but it's serialized differently, so let's use a StyleValueList with 2 length-percentage values.
2022-03-21LibWeb: Only invalidate stacking context tree for opacity/z-index changeAndreas Kling
I came across some websites that change an elements CSS "opacity" in their :hover selectors. That caused us to relayout on hover, which we'd like to avoid. With this patch, we now check if a property only affects the stacking context tree, and if nothing layout-affecting has changed, we only invalidate the stacking context tree, causing it to be rebuilt on next paint or hit test. This makes :hover { opacity: ... } rules much faster. :^)
2022-03-18LibWeb: Mark more CSS properties as not affecting layoutSam Atkins
- background properties - box-shadow - cursor - SVG fill/stroke properties - image-rendering - outline properties - pointer-events - user-select This should be basically all of them. I skipped `opacity` and `transform` since establishing a stacking context feels like a layout-affecting thing, but I could be very wrong on that!
2022-03-16LibWeb: Mark a bunch of CSS border-* properties as not affecting layoutAndreas Kling
border*-width and border-collapse affect layout, but all the color, style and radius ones will only need a repaint if changed. :^)
2022-03-16LibWeb: Mark all text-decoration* CSS properties as not affecting layoutAndreas Kling
2022-03-16LibWeb: Annotate which CSS properties may affect layoutAndreas Kling
This patch adds CSS::property_affects_layout(PropertyID) which tells us whether a CSS property would affect layout if it were changed. This will be used to avoid unnecessary relayout work when something changes that really only requires us to repaint the page. To mark a property as not affecting layout, set "affects-layout" to false in the corresponding Properties.json entry. Note that all properties affect layout by default.
2022-03-12LibWeb: Add support for the text-justify propertysin-ack
This commit adds the text-justify property as defined in: https://drafts.csswg.org/css-text/#propdef-text-justify
2022-03-07LibWeb: Support more CSS image-rendering valuesAndreas Kling
This patch adds support for "crisp-edges", "high-quality" and "smooth" for the CSS image-rendering property. "crisp-edges" maps to nearest-neighbor scaling for <canvas> and <img> elements, while "high-quality" and "smooth" both use bilinear blending.
2022-02-25LibWeb: Parse the `content` propertySam Atkins
For now, we only understand `none`, `normal`, `<image>` and `<string>`. The various other functions and identifiers can be added later. We can *almost* use a StyleValueList for this, except it's divided into two parts - the content, and the optional "alt text". So, I've added a new StyleValue for it.
2022-02-19LibWeb: Add support for CSS image-rendering propertyMaciej
Currently only "auto" and "pixelated" values are supported.
2022-02-07LibWeb: Parse `display: inline-flex`Sam Atkins
This was already handled in the CSS machinery, we just never parsed it.
2022-02-07LibWeb: Add `pointer-events: all`Sam Atkins
This is basically the same as `auto` in the spec, so let's just treat them as identical for now. Gets rid of some Discord CSS parser spam. :^)
2022-01-24LibWeb: Add `none` as a valid identifier for `fill` and `stroke`Sam Atkins
2022-01-20LibWeb: Add missing "auto" identifiers for min-width/heightSam Atkins
Both of these have "auto" as their initial value, so the only reason they work currently is that "auto" is implicitly a Length.
2021-11-10LibWeb: Add initial values for all CSS propertiesSam Atkins
It's a little verbose to repeat these in cases like the borders, but if everything has an initial value, we can guarantee that `property_initial_value()` will return something! :^)
2021-11-10LibWeb: Add initial values and longhands to `background` definitionSam Atkins
There is no specified initial value, but `transparent` is equivalent to setting all the background properties to their defaults.
2021-11-10LibWeb: Correct initial values in Properties.jsonSam Atkins
- `align-items`: `normal` is the initial value in the CSS-ALIGN spec, but `stretch` is in CSS-FLEXBOX. The FLEXBOX spec is the one we've actually implemented elsewhere, and ALIGN adds new values with special syntax, so it's not trivial to add it here. - `border-spacing`: `0` is equivalent to `0px 0px` and we don't yet parse the double-value syntax. - `text-decoration-thickness`: Had the wrong value.
2021-11-10LibWeb: Parse `background-size` propertySam Atkins
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. :^)