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

fix(core): handle !important in style property value #39603

Closed
wants to merge 2 commits into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 8, 2020

  • Fixes that the Ivy styling logic wasn't accounting for !important in the property value.
  • Fixes that the default DOM renderer only sets !important on a property with a dash in its name.
  • Accounts for the flags parameter of setStyle in the server renderer.

Fixes #35323.

@google-cla google-cla bot added the cla: yes label Nov 8, 2020
@crisbeto crisbeto force-pushed the 35323/style-important branch 4 times, most recently from 66543f6 to 16c63a5 Compare November 8, 2020 16:28
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release type: bug/fix labels Nov 8, 2020
@ngbot ngbot bot modified the milestone: needsTriage Nov 8, 2020
@crisbeto crisbeto marked this pull request as ready for review November 8, 2020 16:53
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the fix @crisbeto 👍 Just left a couple comments.

packages/core/src/render3/node_manipulation.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/styling_spec.ts Outdated Show resolved Hide resolved
* Fixes that the Ivy styling logic wasn't accounting for `!important` in the property value.
* Fixes that the default DOM renderer only sets `!important` on a property with a dash in its name.
* Accounts for the `flags` parameter of `setStyle` in the server renderer.

Fixes angular#35323.
@crisbeto crisbeto force-pushed the 35323/style-important branch 2 times, most recently from 08ca3a5 to 84a96f7 Compare November 10, 2020 17:38
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Thanks for the updates @crisbeto 👍

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 10, 2020
@AndrewKushnir
Copy link
Contributor

Presubmit.

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Reviewed-for: size-tracking

@@ -12,7 +12,7 @@
"master": {
"uncompressed": {
"runtime-es2015": 3037,
"main-es2015": 448922,
"main-es2015": 449483,
Copy link
Contributor

Choose a reason for hiding this comment

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

From the most recent CI run in master:

SUCCESS: Commit 5205db5564f21c214a96000e018a08f3de7d44d8 uncompressed main-es2015 did NOT cross size threshold of 500 bytes or >1% (expected: 448922, actual: 449338).

The current size is 449338 and the size in the PR is 449483, so it's only 145 chars difference which looks reasonable.

@pullapprove pullapprove bot requested a review from alxhub November 10, 2020 19:37
@AndrewKushnir
Copy link
Contributor

FYI presubmit is successful for the changes in this PR.

@AndrewKushnir AndrewKushnir removed the action: presubmit The PR is in need of a google3 presubmit label Nov 11, 2020
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: size-tracking

atscott pushed a commit that referenced this pull request Nov 12, 2020
* Fixes that the Ivy styling logic wasn't accounting for `!important` in the property value.
* Fixes that the default DOM renderer only sets `!important` on a property with a dash in its name.
* Accounts for the `flags` parameter of `setStyle` in the server renderer.

Fixes #35323.

PR Close #39603
@atscott atscott closed this in 4476324 Nov 12, 2020
basherr pushed a commit to basherr/angular that referenced this pull request Nov 14, 2020
* Fixes that the Ivy styling logic wasn't accounting for `!important` in the property value.
* Fixes that the default DOM renderer only sets `!important` on a property with a dash in its name.
* Accounts for the `flags` parameter of `setStyle` in the server renderer.

Fixes angular#35323.

PR Close angular#39603
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 13, 2020
@pullapprove pullapprove bot added area: build & ci Related the build and CI infrastructure of the project area: server Issues related to server-side rendering labels Dec 13, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Dec 13, 2020
@petebacondarwin
Copy link
Member

Also fixes #12009

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project area: core Issues related to the framework runtime area: server Issues related to server-side rendering cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ivy] [style] binding breaking backwards compability changes
5 participants