Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove optgroup element #93

Open
cevdetardaharan opened this issue Oct 15, 2024 · 4 comments · May be fixed by #94
Open

Remove optgroup element #93

cevdetardaharan opened this issue Oct 15, 2024 · 4 comments · May be fixed by #94

Comments

@cevdetardaharan
Copy link

In modern-normalize.css file, there is a reset for form elements:

/**
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
*/

button,
input,
optgroup,
select,
textarea {
	font-family: inherit; /* 1 */
	font-size: 100%; /* 1 */
	line-height: 1.15; /* 1 */
	margin: 0; /* 2 */
}

button, input, selectandtextareaseem fine butoptgroupis unnecessary; why you may ask, becauseoptgroupshould be a child element ofselectandoptgroupshould be a parent element ofoptionelement, we can remove it to take advantage of cascading whichselect` element does when it inherits.

@sindresorhus
Copy link
Owner

Relevant: necolas/normalize.css#581

@cevdetardaharan
Copy link
Author

Relevant: necolas/normalize.css#581

The font family and font style are not inherited by optgroup labels and options within an optgroup in Firefox 45 (probably happens in some older versions too). The screenshot below demonstrates this using the normalize.css UI tests page:

Firefox 45? https://caniuse.com/usage-table
From version 2 - 45, only 0,02% of people are using it, so it's really unnecessary? In my opinion it should be deleted, we have more problems than that (which is a bug in Firefox 45, it's so small).

11: 0.01%
44: 0.01%

@sindresorhus
Copy link
Owner

Firefox 45 was the latest then. It's not clear if or when it was fixed. It needs to be proven that it was fixed first.

@cevdetardaharan
Copy link
Author

Firefox 45 was the latest then. It's not clear if or when it was fixed. It needs to be proven that it was fixed first.

Got it but still if you look https://caniuse.com/usage-table

11: 0.01%
44: 0.01%
52: 0.04%
54: 0.01%
56: 0.02%
78: 0.01%
88: 0.01%
---
102: 0.01%
103: 0.01%
113: 0.01%
115: 0.35%
117: 0.01%
118: 0.09%
120: 0.01%
121: 0.01%
123: 0.01%
124: 0.01%
125: 0.01%
126: 0.03%
127: 0.04%
128: 0.45%
129: 1.09%
130: 0.01%

Even before Firefox v100 the usage is only 0.11% which I might say even IE usage is 0.59% ? The thing is I don't know how to prove if it's fixed after v45 or not...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants