Skip to content

Commit 3f2dede

Browse files
committed
Remove active radio-group checkmark icon
Fixes #71
1 parent 167617e commit 3f2dede

3 files changed

Lines changed: 7 additions & 20 deletions

File tree

dist/js/customizer.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/_js/customizer/scss/controls/_radio-group.scss

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,6 @@
2929
&:checked + label {
3030
background-color: var(--sm-color-palette-accent-color-7);
3131
color: var(--sm-color-palette-neutral-color-1);
32-
33-
&:before {
34-
content: "";
35-
36-
display: inline-block;
37-
color: inherit;
38-
39-
position: relative;
40-
top: .285em;
41-
margin-right: .45em;
42-
43-
height: .8em;
44-
width: .55em;
45-
46-
border-right: 2px solid;
47-
border-bottom: 2px solid;
48-
49-
transform: translateY(-50%) rotate(45deg);
50-
}
5132
}
5233
}
5334

tests/js/radio-group-style.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ export const runRadioGroupStyleTests = async ( assert ) => {
44
const { readFile } = await import( 'node:fs/promises' );
55
const source = await readFile( RADIO_GROUP_SCSS_PATH, 'utf8' );
66
const labelBlockMatch = source.match( /label\s*\{([\s\S]*?)&:nth-of-type\(2\)/ );
7+
const checkedLabelBlockMatch = source.match( /&:checked\s*\+\s*label\s*\{([\s\S]*?)\n\s*\}\n\s*\}/ );
78

89
assert.ok( labelBlockMatch, 'expected to find the shared sm-radio-group label rule' );
10+
assert.ok( checkedLabelBlockMatch, 'expected to find the shared checked label rule' );
911
assert.ok(
1012
/transition\s*:\s*all\s+1s\s+ease\s*;/.test( labelBlockMatch[1] ),
1113
'shared sm-radio-group labels should use the temporary 1s inspection transition'
1214
);
15+
assert.ok(
16+
! /&:before\s*\{/.test( checkedLabelBlockMatch[1] ),
17+
'shared sm-radio-group active labels should not render a checkmark pseudo-element'
18+
);
1319
};

0 commit comments

Comments
 (0)