Refactor CSS selectors in title panel override for readability

pull/11869/head
Thibaud Colas 2024-04-18 10:27:03 +01:00
rodzic fe148c01e5
commit bd6f314b87
1 zmienionych plików z 4 dodań i 10 usunięć

Wyświetl plik

@ -1,10 +1,7 @@
// Styles for title fields throughout the page.
// The `title` class is meant to be applied by end users throughout different forms APIs.
.w-panel.title,
.w-field.title {
input,
textarea,
.Draftail-Editor .public-DraftEditor-content {
:where(.w-panel, .w-field).title {
:where(input, textarea, .Draftail-Editor .public-DraftEditor-content) {
@apply w-h2;
color: theme('colors.text-context');
}
@ -12,8 +9,7 @@
// Styles for the title field when at the top of the page.
// Its the first panel when comments are disabled, second if enabled.
.w-panel.title:nth-child(1),
.w-panel.title:nth-child(2) {
.w-panel.title:nth-child(-n + 2) {
.w-panel__header {
@apply w-sr-only;
@ -32,9 +28,7 @@
order: 2;
}
input,
textarea,
.Draftail-Editor .public-DraftEditor-content {
:is(input, textarea, .Draftail-Editor .public-DraftEditor-content) {
@apply w-h1;
color: theme('colors.text-context');
// Slightly out-dented so the fields is horizontally aligned.