Skip to content

Commit

Permalink
WebUI Polymer 2: Use !important in cr-toast to make ::slotted style t…
Browse files Browse the repository at this point in the history
…ake effect.

Specificity of ::slotted() rules is different in Shadow DOM v0 and v1. The latter
is the correct specced behavior, but the code so far relied on the former.

Bug: 896674
Change-Id: I0eb2fc0925e1cb83db732e89d958acab4a8fc5fb
Reviewed-on: https://chromium-review.googlesource.com/c/1290198
Reviewed-by: Scott Chen <scottchen@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601706}
  • Loading branch information
freshp86 authored and Commit Bot committed Oct 22, 2018
1 parent 05c6009 commit 312b15c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ui/webui/resources/cr_elements/cr_toast/cr_toast.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
}

:host ::slotted(paper-button) {
background-color: transparent;
border: none;
color: var(--google-blue-300);
margin-inline-start: 32px;
min-width: 52px;
padding: 8px;
background-color: transparent !important;
border: none !important;
color: var(--google-blue-300) !important;
margin-inline-start: 32px !important;
min-width: 52px !important;
padding: 8px !important;
}

:host ::slotted(paper-button:hover) {
background-color: transparent;
background-color: transparent !important;
}
</style>
<slot></slot>
Expand Down

0 comments on commit 312b15c

Please sign in to comment.