-
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.
feat(checkbox): Added mixin to customize checkbox touch dimension. (#…
…4697) BREAKING CHANGE: Removed `$mdc-checkbox-ui-pct` sass variable from `MDCCheckbox`
- Loading branch information
Showing
9 changed files
with
223 additions
and
28 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
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
164 changes: 164 additions & 0 deletions
164
test/screenshot/spec/mdc-checkbox/mixins/touch-dimension.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,164 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
Copyright 2019 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>Checkbox Touch Dimension Mixin - MDC Web Screenshot Test</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="../../../out/mdc.checkbox.css"> | ||
<link rel="stylesheet" href="../../../out/spec/fixture.css"> | ||
<link rel="stylesheet" href="../../../out/spec/mdc-checkbox/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--checkbox"> | ||
<div class="mdc-checkbox test-checkbox-touch-dimension"> | ||
<input type="checkbox" | ||
class="mdc-checkbox__native-control" | ||
id="checkbox-unchecked"/> | ||
<div class="mdc-checkbox__background"> | ||
<svg class="mdc-checkbox__checkmark" | ||
viewBox="0 0 24 24"> | ||
<path class="mdc-checkbox__checkmark-path" | ||
fill="none" | ||
d="M1.73,12.91 8.1,19.28 22.79,4.59"/> | ||
</svg> | ||
<div class="mdc-checkbox__mixedmark"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="test-cell test-cell--checkbox"> | ||
<div class="mdc-checkbox test-checkbox-touch-dimension"> | ||
<input type="checkbox" | ||
checked | ||
class="mdc-checkbox__native-control" | ||
autofocus | ||
id="checkbox-checked"/> | ||
<div class="mdc-checkbox__background"> | ||
<svg class="mdc-checkbox__checkmark" | ||
viewBox="0 0 24 24"> | ||
<path class="mdc-checkbox__checkmark-path" | ||
fill="none" | ||
d="M1.73,12.91 8.1,19.28 22.79,4.59"/> | ||
</svg> | ||
<div class="mdc-checkbox__mixedmark"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="test-cell test-cell--checkbox"> | ||
<div class="mdc-checkbox test-checkbox-touch-dimension"> | ||
<input type="checkbox" | ||
checked | ||
class="mdc-checkbox__native-control" | ||
id="checkbox-indeterminate"/> | ||
<div class="mdc-checkbox__background"> | ||
<svg class="mdc-checkbox__checkmark" | ||
viewBox="0 0 24 24"> | ||
<path class="mdc-checkbox__checkmark-path" | ||
fill="none" | ||
d="M1.73,12.91 8.1,19.28 22.79,4.59"/> | ||
</svg> | ||
<div class="mdc-checkbox__mixedmark"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="test-cell test-cell--checkbox"> | ||
<div class="mdc-checkbox mdc-checkbox--disabled test-checkbox-touch-dimension"> | ||
<input type="checkbox" | ||
disabled | ||
class="mdc-checkbox__native-control" | ||
id="checkbox-unchecked-disabled"/> | ||
<div class="mdc-checkbox__background"> | ||
<svg class="mdc-checkbox__checkmark" | ||
viewBox="0 0 24 24"> | ||
<path class="mdc-checkbox__checkmark-path" | ||
fill="none" | ||
d="M1.73,12.91 8.1,19.28 22.79,4.59"/> | ||
</svg> | ||
<div class="mdc-checkbox__mixedmark"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="test-cell test-cell--checkbox"> | ||
<div class="mdc-checkbox mdc-checkbox--disabled test-checkbox-touch-dimension"> | ||
<input type="checkbox" | ||
disabled | ||
checked | ||
class="mdc-checkbox__native-control" | ||
id="checkbox-checked-disabled"/> | ||
<div class="mdc-checkbox__background"> | ||
<svg class="mdc-checkbox__checkmark" | ||
viewBox="0 0 24 24"> | ||
<path class="mdc-checkbox__checkmark-path" | ||
fill="none" | ||
d="M1.73,12.91 8.1,19.28 22.79,4.59"/> | ||
</svg> | ||
<div class="mdc-checkbox__mixedmark"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="test-cell test-cell--checkbox"> | ||
<div class="mdc-checkbox mdc-checkbox--disabled test-checkbox-touch-dimension"> | ||
<input type="checkbox" | ||
disabled | ||
class="mdc-checkbox__native-control" | ||
id="checkbox-indeterminate-disabled"/> | ||
<div class="mdc-checkbox__background"> | ||
<svg class="mdc-checkbox__checkmark" | ||
viewBox="0 0 24 24"> | ||
<path class="mdc-checkbox__checkmark-path" | ||
fill="none" | ||
d="M1.73,12.91 8.1,19.28 22.79,4.59"/> | ||
</svg> | ||
<div class="mdc-checkbox__mixedmark"></div> | ||
</div> | ||
</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-checkbox/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