Andreas Kling
2c16e8371f
LibWeb: Add naive support for {margin,padding}-{block,inline}
...
Like other logical properties, we just alias these to the LTR TB default
properties for now.
2023-06-07 11:20:42 +02:00
Luke Wilde
42a183720b
LibWeb/SVG: Support url() in the stroke attribute
...
This allows you to draw gradients in strokes, for example.
2023-06-07 06:29:46 +02:00
Andreas Kling
abd6380cce
LibWeb: Add CSS logical property aliases for margin and padding sides
...
These just map to the LTR+TB defaults for now, as we don't yet resolve
any of the inputs to the logical property selection algorithm.
2023-06-06 21:02:04 +02:00
Andreas Kling
941092e3ad
LibWeb: Make CSS/Properties.json "logical-aliases-for" an array
...
This allows us to specify all aliases properties instead of just one.
2023-06-06 21:02:04 +02:00
stelar7
a5f2024afa
LibWeb: Resolve the transition-delay property
2023-06-03 05:59:19 +02:00
Simon Wanner
293ece2292
LibWeb: Support list-style-position
...
This moves the ::marker inside of <summary> actually inside. :^)
2023-06-03 05:54:49 +02:00
Sam Atkins
76611790e9
LibWeb: Fix order/formatting of Properties.json
2023-06-02 20:04:23 +02:00
Sam Atkins
d3009bd568
LibWeb: Add missing value ranges to CSS properties
...
...except those related to `grid`, because I can't figure out how the 17
different properties interact with each other, and what values apply to
which ones. 😅
All but 1 of these are the infinite range `[-∞,∞]`. As such, specifying
that range does not change anything, but it does make it explicit that
we've looked at what the range should be, instead of just not having
added it.
2023-06-02 20:04:23 +02:00
FalseHonesty
dcead6f5eb
LibWeb: Add support for parsing place-content shorthand CSS property
2023-06-01 09:06:13 +02:00
FalseHonesty
cabfb7867c
LibWeb: Add support for parsing 'inset' shorthand CSS property
2023-05-30 06:02:06 +02:00
Andreas Kling
af004ff0ef
LibWeb: Support min-content for width, min-width and max-width
...
We're gonna need to handle this in many more places, this patch only
adds it to calculate_inner_width().
2023-05-29 21:29:25 +02:00
Andreas Kling
97c510329c
LibWeb: Support max-content for width, min-width and max-width
...
We're gonna need to handle this in many more places, this patch only
adds it to calculate_inner_width().
2023-05-29 21:29:25 +02:00
Ali Mohammad Pur
e90752cc21
LibWeb: Add preliminary support for CSS animations
...
This partially implements CSS-Animations-1 (though there are references
to CSS-Animations-2).
Current limitations:
- Multi-selector keyframes are not supported.
- Most animation properties are ignored.
- Timing functions are not applied.
- Non-absolute values are not interpolated unless the target is also of
the same non-absolute type (e.g. 10% -> 25%, but not 10% -> 20px).
- The JavaScript interface is left as an exercise for the next poor soul
looking at this code.
With those said, this commit implements:
- Interpolation for most common types
- Proper keyframe resolution (including the synthetic from-keyframe
containing the initial state)
- Properly driven animations, and proper style invalidation
Co-Authored-By: Andreas Kling <kling@serenityos.org >
2023-05-29 05:35:41 +02:00
Karthik Karanth
733b74af7c
LibWeb: Support min-inline-size & max-inline-size
...
Currently this assumes that writing-mode is horizontal, and therefore
only affects the min-width/max-width
2023-05-27 16:02:33 +02:00
Andreas Kling
8ba7bd1b67
LibWeb: Accept fit-content as a value for min-width and max-width
...
This starts working immediately in BFC thanks to calculate_inner_width
being used for width constraints. :^)
2023-05-27 05:47:54 +02:00
Andreas Kling
09eb3ef405
LibWeb: Add fit-content as a valid size value for CSS width
2023-05-27 05:47:54 +02:00
Aliaksandr Kalenik
ab5b89eb95
LibWeb: Add basic parsing of grid shorthand CSS property
...
Introduces incomplete parsing of grid shorthand property. Only
<grid-template> part of syntax is supported for now but it is enough
to significantly improve rendering of websites that use this shorthand
to define grid :)
2023-05-27 05:47:14 +02:00
Sam Atkins
91c9d10a78
LibWeb: Use new StyleValue parsing for flex
...
To make this work, we also add `none` as a valid identifier for `flex`.
(This is correct, we just didn't need it before.)
2023-05-25 06:36:10 +02:00
Sam Atkins
6f3e48db57
LibWeb: Fill in some missing property data and bodge extra types
...
We don't yet have generic parsing support for `<filter-value-list>` or
`<paint>`, so listing them here confuses the new StyleValue parsing code
I'm working on. For now, let's skip `<filter-value-list>` since it's
only used in one pkace which manually parses it, and list the parts of
`<paint>` instead which are taken from here:
https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint
2023-05-25 06:36:10 +02:00
Aliaksandr Kalenik
6e0601a63e
LibWeb/CSS: Implement parsing of grid-auto-columns and grid-auto-rows
2023-05-22 06:05:19 +02:00
MacDue
00cda96e2d
LibWeb: Implement SVG opacity properties
...
This implements the stop-opacity, fill-opacity, and stroke-opacity
properties (in CSS). This replaces the existing more ad-hoc
fill-opacity attribute handling.
2023-05-20 08:52:19 +02:00
Sam Atkins
52e9dced1a
LibWeb: Remove unitless-length quirk from properties that don't need it
...
A list of every property that has this quirk is available here:
https://quirks.spec.whatwg.org/#the-unitless-length-quirk
2023-05-18 18:04:48 +02:00
Emil Militzer
b74940ffb7
LibWeb: Set max-values for display CSS property
2023-05-02 20:27:28 +02:00
Emil Militzer
3f7a37465d
LibWeb: Add missing inline-grid for display CSS property
2023-05-02 20:27:28 +02:00
martinfalisse
22202715fc
LibWeb: Parse grid-template property
2023-04-30 05:56:10 +02:00
MacDue
a5fa5e55ef
LibWeb: Allow specifying a URL for an SVG fill
...
This does not do anything yet, but will allow for gradients later!
2023-04-28 09:42:28 +02:00
MacDue
297d8eebcd
LibWeb: Add stop-color as a CSS property
...
(This is to set the color of a stop for an SVG gradient)
2023-04-28 09:42:28 +02:00
Emil Militzer
880878e552
LibWeb: Add missing valid-identifiers for display CSS property
2023-04-25 13:46:11 +02:00
MacDue
d5e61168b2
LibWeb: Add longhand properties for background-position
...
If background-position was not longhand enough for you, we've
now got background-position-x and background-position-y :^)
2023-04-03 07:10:33 +02:00
MacDue
87b8a36e56
LibWeb: Parse and plumb the accent-color CSS property
2023-03-23 08:27:51 +00:00
Aliaksandr Kalenik
ab99e95549
LibWeb: Parse font-stretch CSS property
2023-02-03 12:49:13 +00:00
martinfalisse
9bc001f410
LibWeb: Parse grid-area CSS property
2023-01-21 14:35:00 +01:00
martinfalisse
a6548c4d80
LibWeb: Parse grid-template-areas CSS property
2023-01-21 14:35:00 +01:00
martinfalisse
64c353f11c
LibWeb: Parse border-collapse property for HTML table
2023-01-03 20:02:47 +01:00
Luke Wilde
42b011b571
LibWeb: Mark the border-style properties as layout affecting
...
`border-style: none` and `border-style: hidden` remove the border
entirely during layout, causing boxes to shift around.
2022-12-31 23:22:02 +01:00
martinfalisse
9e6612c49b
LibWeb: Parse CSS gap property
...
Including the legacy grid-gap, grid-column-gap and grid-row-gap
properties.
2022-11-07 10:06:07 +01:00
Luke Wilde
8ace6b4f1d
LibWeb: Establish stacking context when backdrop-filter is not 'none'
2022-10-24 18:05:58 +02:00
Andreas Kling
f8a2c0586a
LibWeb: Parse the CSS align-content property
2022-10-14 19:50:15 +02:00
MacDue
d1b99282d8
LibWeb+Meta: Parse the backdrop-filter CSS property
...
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-09-16 10:50:48 +01:00
martinfalisse
7bb3a8d646
LibWeb: Parse grid-column and grid-row CSS values
2022-08-25 13:47:48 +02:00
martinfalisse
44d08b81b7
LibWeb: Parse grid-column-start and related CSS properties
...
Parse grid-column-start, end, and the equivalent for rows.
2022-08-25 13:47:48 +02:00
martinfalisse
92a00648b1
LibWeb: Parse grid-template-columns and grid-template-rows
...
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-25 13:47:48 +02:00
martinfalisse
e4541d83d3
LibWeb: Parse grid display value
2022-08-25 13:47:48 +02:00
Tom
b4dd477644
LibWeb: Parse rect style value
...
Add ability to parse a rect when it is used as the value of a style
property.
2022-08-07 22:40:11 +02:00
MacDue
d7d34d88e5
LibWeb: Implement appearance CSS property
...
This includes the "compat" values even though they are not strictly
necessary.
2022-07-23 01:45:49 +02:00
Sam Atkins
469e881eca
LibWeb: Mark transform property as affecting stacking contexts
2022-07-21 16:36:08 +02:00
Andreas Kling
789f258412
LibWeb: Reject negative values for flex-grow and flex-shrink
2022-07-19 12:45:50 +02:00
Andreas Kling
2f0657739b
LibWeb: Honor align-self over align-items when non-auto on flex item
2022-07-12 02:46:21 +02:00
Sam Atkins
a20188cd91
LibWeb: Use generated enum code for property value validation
...
This has the nice benefit of removing a lot of duplicated lists of
values from Properties.json. :^)
2022-04-14 14:54:06 +02:00
Enver Balalic
58398b1e12
LibWeb: Implement the flex order CSS property
...
Adds support for the flex order property and a test page for it
on the browser welcome page.
2022-04-02 18:40:32 +02:00