Skip to content
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

Miscellaneous small CSS changes #3348

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AtkinsSJ
Copy link
Member

Little things found while working on calc() simplification.

We don't need to resolve these at this point, and we already don't do so
for lengths, so leave them in their calc() form until they're used.
Using the raw value meant that 1em would be incorrectly treated as 1px,
for example.
All the code here was removed in commit
c282138
`<flex-percentage>` is not a thing.
Saves us a round-trip to CSSPixels and back when we already have a
double value.

float radius = 0.0f;
if (drop_shadow.radius.has_value()) {
radius = drop_shadow.radius->resolved(resolution_context).raw_value();
radius = static_cast<float>(drop_shadow.radius->resolved(resolution_context).to_px(resolution_context));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a WPT test we can import for this? Somewhere in html/canvas/element/filters perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants