-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support calc()
expressions in all properties
#1202
Labels
Language support
Related to unsupported features in HTML/CSS/ARIA
Comments
Jym77
added
the
Language support
Related to unsupported features in HTML/CSS/ARIA
label
Jul 22, 2022
This was referenced May 1, 2023
This was referenced Jun 6, 2023
This was referenced Jun 27, 2023
This was referenced Jul 17, 2023
Merged
Merged
This was referenced Oct 19, 2023
This was referenced Nov 21, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New plan of attack… (post #1416 )
Length
value inalfa-style
with the one fromalfa-css/src/value/numeric
.Length
usage fromalfa-css/src/calculation/numeric
toalfa-css/src/value/numeric
. This will probably require to provide aparseBase
function in the later that can only parse non-calculated lengths (as a temporary solution). This will also need to expose all methods from the former on the later.Length
is used as a "final" value type (i.e. inalfa-style
), replaceparseBase
withparse
(i.e. accept calculation and provide aresolve
helper). There may also be places inalfa-media
that will need update.Note: some style properties do not accept negative values, and this is treated differently for calculated and non-calculated values: Range checking.
Note: this will likely require to buff up the new
Length
with methods from the old one (isZero
, …)Note: it seems that calculation in media queries need to be parenthesised (
min-width: (10px + 10px)
, notmin-width: 10px + 10px
), need to find normative reference for that.calculation/numeric/length
to only what is needed in math expressions.Note: it might be worth re-introducing a common
Dimension
abstraction on the new side also.dimension-percentage
types we need, i.e.length-percentage
andangle-percentage
.Note: it might be worth having an abstraction here also.
Note: it might be worth recording in the type whether the non-calculated value is holding a dimension or a percentage.
alfa-style/src/property/value/compound.ts
.width
and other CSS properties #1444Value.Parser<V> = Parser<Slice<Token>, V, string>
since we use it everywhere.implements Resolvable
where relevant.alfa-css
in order to usesrc/value/numeric
rather thansrc/calculation/numeric
. It is likely best to first introduce aparseBase
to parse non-calculated values for easy migration.src/calculation/numeric
to its bare minimum; removeMath
inheritance fromValue
(renameresolve2
toresolve
); removesrc/calculation/numeric
inheritance fromValue
; movesrc/value.ts
back insrc/value/value.ts
.Value.HasCalculation
directly in extends clause, instead of having an explicitCALC
parameter.parseBase
that shouldn't be needed anymore.Note: need to check if all contexts actually allow calculations (e.g. media queries).
alfa-css
thenumeric
values rather than calculation; clean up any remaining "deep imports" to@siteimprove/alfa-css/src/value/numeric
Clean up the workarounds in R62 serialisation.Clean up disambiguation ofthis
constraint in CSS types. #1426Canonical
abstraction for all types, corresponding to the resolved and computed version of the type; maybe also hide away theCalculated
anFixed
abstractions.partiallyResolve
as a member method, returningresolve()
by default, add it toResolvable
interface.Resolvable
interface everywhere.Serialisable
so that the correct JSON is used instead of top-levelValue.JSON
?alfa-style
).After #980, easy support of
calc()
was added in #1201.We now need to go through all properties and add support where relevant. Can also wait until the need arises…
outline-offset
,outline-width
).The text was updated successfully, but these errors were encountered: