-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(menu): Increase specificity of selection group class (#4172)
(cherry picked from commit 1d919ef)
- Loading branch information
1 parent
bb8f94e
commit 870b234
Showing
7 changed files
with
206 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
test/screenshot/spec/mdc-menu/classes/menu-selection-group.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
Copyright 2018 Google Inc. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
--> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Menu Selection Group - MDC Web Screenshot Test</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="../../../out/mdc.list.css"> | ||
<link rel="stylesheet" href="../../../out/mdc.menu-surface.css"> | ||
<link rel="stylesheet" href="../../../out/mdc.menu.css"> | ||
<link rel="stylesheet" href="../../../out/spec/fixture.css"> | ||
<link rel="stylesheet" href="../../../out/spec/mdc-menu/fixture.css"> | ||
|
||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118996389-2"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', 'UA-118996389-2'); | ||
</script> | ||
</head> | ||
|
||
<body class="test-container"> | ||
<main class="test-viewport test-viewport--mobile"> | ||
<div class="test-layout"> | ||
<div class="test-cell test-cell--menu"> | ||
|
||
<div class="mdc-menu mdc-menu-surface mdc-menu-surface--open" tabindex="-1" id="demo-menu"> | ||
<ul class="mdc-list" role="menu" aria-hidden="true" aria-orientation="vertical"> | ||
<li> | ||
<ul class="mdc-menu__selection-group"> | ||
<li class="mdc-list-item" role="menuitem"> | ||
<span class="mdc-list-item__graphic mdc-menu__selection-group-icon"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> | ||
<path fill="none" d="M0 0h24v24H0z"/> | ||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/> | ||
</svg> | ||
</span> | ||
<span class="mdc-list-item__text"> | ||
Single | ||
</span> | ||
</li> | ||
<li class="mdc-list-item mdc-list-item--disabled" role="menuitem"> | ||
<span class="mdc-list-item__graphic mdc-menu__selection-group-icon"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> | ||
<path fill="none" d="M0 0h24v24H0z"/> | ||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/> | ||
</svg> | ||
</span> | ||
<span class="mdc-list-item__text"> | ||
1.15 | ||
</span> | ||
</li> | ||
<li class="mdc-list-item" role="menuitem"> | ||
<span class="mdc-list-item__graphic mdc-menu__selection-group-icon"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> | ||
<path fill="none" d="M0 0h24v24H0z"/> | ||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/> | ||
</svg> | ||
</span> | ||
<span class="mdc-list-item__text"> | ||
Double | ||
</span> | ||
</li> | ||
<li class="mdc-list-item mdc-menu-item--selected" role="menuitem"> | ||
<span class="mdc-list-item__graphic mdc-menu__selection-group-icon"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> | ||
<path fill="none" d="M0 0h24v24H0z"/> | ||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/> | ||
</svg> | ||
</span> | ||
<span class="mdc-list-item__text"> | ||
Custom: 1.2 | ||
</span> | ||
</li> | ||
</ul> | ||
</li> | ||
<li class="mdc-list-divider" role="separator"></li> | ||
<li class="mdc-list-item" role="menuitem"> | ||
<span class="mdc-list-item__text"> | ||
Add space before paragraph | ||
</span> | ||
</li> | ||
<li class="mdc-list-item" role="menuitem"> | ||
<span class="mdc-list-item__text"> | ||
Add space after paragraph | ||
</span> | ||
</li> | ||
<li class="mdc-list-divider" role="separator"></li> | ||
<li class="mdc-list-item" role="menuitem"> | ||
<span class="mdc-list-item__text"> | ||
Custom spacing... | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</main> | ||
|
||
<!-- Automatically provides/replaces `Promise` if missing or broken. --> | ||
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fontfaceobserver/2.0.13/fontfaceobserver.standalone.js"></script> | ||
<script src="../../../out/material-components-web.js"></script> | ||
<script src="../../../out/spec/fixture.js"></script> | ||
<script src="../../../out/spec/mdc-menu/fixture.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* @license | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
window.mdc.testFixture.fontsLoaded.then(() => { | ||
window.mdc.testFixture.notifyDomReady(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2018 Google Inc. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions:/ | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software./ | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
// | ||
|
||
@import "../mixins"; | ||
|
||
.test-cell--menu { | ||
@include test-cell-size(260, 410); | ||
|
||
position: relative; | ||
} |