Skip to content

Commit

Permalink
fix(lumo): disabled checkbox group label style (#144)
Browse files Browse the repository at this point in the history
* Fix checkbox group label greying out with lumo theme

* Add visual tests for disabled checkbox group
  • Loading branch information
Nii Yeboah authored and web-padawan committed Feb 15, 2019
1 parent d263a0b commit b791d26
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/checkbox-group-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3>Checkbox Group</h3>
<h3>Checkbox Group Disabled</h3>
<vaadin-demo-snippet id="checkbox-group-demos-checkbox-group-disabled">
<template preserve-content>
<vaadin-checkbox-group disabled>
<vaadin-checkbox-group label="Disabled" disabled>
<vaadin-checkbox value="1">1</vaadin-checkbox>
<vaadin-checkbox value="2">2</vaadin-checkbox>
<vaadin-checkbox value="3">3</vaadin-checkbox>
Expand Down
7 changes: 7 additions & 0 deletions test/visual/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
</vaadin-checkbox-group>
</div>

<div id="disabled-group-tests">
<vaadin-checkbox-group label="Choose a number" disabled>
<vaadin-checkbox value="1">1</vaadin-checkbox>
<vaadin-checkbox value="2">2</vaadin-checkbox>
</vaadin-checkbox-group>
</div>

<div id="validation-tests">
<vaadin-checkbox-group required error-message="Please choose a number" label="Choose a number" id="validation-checkbox-group">
<vaadin-checkbox value="1">1</vaadin-checkbox>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion test/visual/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ gemini.suite('vaadin-checkbox', function(rootSuite) {
.capture('default');
});

gemini.suite(`disabled-group-tests-${theme}`, (suite) => {
suite
.setUrl(`default.html?theme=${theme}`)
.setCaptureElements('#disabled-group-tests')
.capture('default');
});

gemini.suite(`validation-tests-${theme}`, function(suite) {
suite
.setUrl(`default.html?theme=${theme}`)
.setCaptureElements('#validation-tests')
.capture('error');
});

});

});
5 changes: 5 additions & 0 deletions theme/lumo/vaadin-checkbox-group-styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
[part="label"] {
padding-bottom: 0.7em;
}

:host([disabled]) [part="label"] {
color: var(--lumo-disabled-text-color);
-webkit-text-fill-color: var(--lumo-disabled-text-color);
}
</style>
</template>
</dom-module>

0 comments on commit b791d26

Please sign in to comment.