mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-07 21:04:38 +01:00
New repo: Clean up and improve CSS
- drop custom layout rules for this page
- move form-related content to form.css
- extend new form CSS to add gap between labels and input fields
(cherry picked from commit 471e5b1975
)
This commit is contained in:
parent
424f85304e
commit
38d2933cc1
3 changed files with 110 additions and 107 deletions
|
@ -652,97 +652,6 @@ img.ui.avatar,
|
||||||
background: var(--color-active);
|
background: var(--color-active);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.form .fields.error .field textarea,
|
|
||||||
.ui.form .fields.error .field select,
|
|
||||||
.ui.form .fields.error .field input:not([type]),
|
|
||||||
.ui.form .fields.error .field input[type="date"],
|
|
||||||
.ui.form .fields.error .field input[type="datetime-local"],
|
|
||||||
.ui.form .fields.error .field input[type="email"],
|
|
||||||
.ui.form .fields.error .field input[type="number"],
|
|
||||||
.ui.form .fields.error .field input[type="password"],
|
|
||||||
.ui.form .fields.error .field input[type="search"],
|
|
||||||
.ui.form .fields.error .field input[type="tel"],
|
|
||||||
.ui.form .fields.error .field input[type="time"],
|
|
||||||
.ui.form .fields.error .field input[type="text"],
|
|
||||||
.ui.form .fields.error .field input[type="file"],
|
|
||||||
.ui.form .fields.error .field input[type="url"],
|
|
||||||
.ui.form .fields.error .field .ui.dropdown,
|
|
||||||
.ui.form .fields.error .field .ui.dropdown .item,
|
|
||||||
.ui.form .field.error .ui.dropdown,
|
|
||||||
.ui.form .field.error .ui.dropdown .text,
|
|
||||||
.ui.form .field.error .ui.dropdown .item,
|
|
||||||
.ui.form .field.error textarea,
|
|
||||||
.ui.form .field.error select,
|
|
||||||
.ui.form .field.error input:not([type]),
|
|
||||||
.ui.form .field.error input[type="date"],
|
|
||||||
.ui.form .field.error input[type="datetime-local"],
|
|
||||||
.ui.form .field.error input[type="email"],
|
|
||||||
.ui.form .field.error input[type="number"],
|
|
||||||
.ui.form .field.error input[type="password"],
|
|
||||||
.ui.form .field.error input[type="search"],
|
|
||||||
.ui.form .field.error input[type="tel"],
|
|
||||||
.ui.form .field.error input[type="time"],
|
|
||||||
.ui.form .field.error input[type="text"],
|
|
||||||
.ui.form .field.error input[type="file"],
|
|
||||||
.ui.form .field.error input[type="url"],
|
|
||||||
.ui.form .field.error select:focus,
|
|
||||||
.ui.form .field.error input:not([type]):focus,
|
|
||||||
.ui.form .field.error input[type="date"]:focus,
|
|
||||||
.ui.form .field.error input[type="datetime-local"]:focus,
|
|
||||||
.ui.form .field.error input[type="email"]:focus,
|
|
||||||
.ui.form .field.error input[type="number"]:focus,
|
|
||||||
.ui.form .field.error input[type="password"]:focus,
|
|
||||||
.ui.form .field.error input[type="search"]:focus,
|
|
||||||
.ui.form .field.error input[type="tel"]:focus,
|
|
||||||
.ui.form .field.error input[type="time"]:focus,
|
|
||||||
.ui.form .field.error input[type="text"]:focus,
|
|
||||||
.ui.form .field.error input[type="file"]:focus,
|
|
||||||
.ui.form .field.error input[type="url"]:focus {
|
|
||||||
background-color: var(--color-error-bg);
|
|
||||||
border-color: var(--color-error-border);
|
|
||||||
color: var(--color-error-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.form .fields.error .field .ui.dropdown,
|
|
||||||
.ui.form .field.error .ui.dropdown,
|
|
||||||
.ui.form .fields.error .field .ui.dropdown:hover,
|
|
||||||
.ui.form .field.error .ui.dropdown:hover {
|
|
||||||
border-color: var(--color-error-border) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.form .fields.error .field .ui.dropdown .menu .item:hover,
|
|
||||||
.ui.form .field.error .ui.dropdown .menu .item:hover {
|
|
||||||
background-color: var(--color-error-bg-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.form .fields.error .field .ui.dropdown .menu .active.item,
|
|
||||||
.ui.form .field.error .ui.dropdown .menu .active.item {
|
|
||||||
background-color: var(--color-error-bg-active) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.form .fields.error .dropdown .menu,
|
|
||||||
.ui.form .field.error .dropdown .menu {
|
|
||||||
border-color: var(--color-error-border) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:-webkit-autofill,
|
|
||||||
input:-webkit-autofill:focus,
|
|
||||||
input:-webkit-autofill:hover,
|
|
||||||
input:-webkit-autofill:active,
|
|
||||||
.ui.form .field.field input:-webkit-autofill,
|
|
||||||
.ui.form .field.field input:-webkit-autofill:focus,
|
|
||||||
.ui.form .field.field input:-webkit-autofill:hover,
|
|
||||||
.ui.form .field.field input:-webkit-autofill:active {
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: var(--color-text);
|
|
||||||
box-shadow: 0 0 0 100px var(--color-primary-light-6) inset !important;
|
|
||||||
border-color: var(--color-primary-light-4) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.form .field.muted {
|
|
||||||
opacity: var(--opacity-disabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
.text.primary {
|
.text.primary {
|
||||||
color: var(--color-primary) !important;
|
color: var(--color-primary) !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,11 @@ fieldset label:has(input[type="number"]) {
|
||||||
font-weight: var(--font-weight-medium);
|
font-weight: var(--font-weight-medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* override inline style on custom input elements */
|
||||||
|
fieldset label .ui.dropdown {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
fieldset .help {
|
fieldset .help {
|
||||||
font-weight: var(--font-weight-normal);
|
font-weight: var(--font-weight-normal);
|
||||||
}
|
}
|
||||||
|
@ -27,9 +32,17 @@ fieldset .help {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset input[type="checkbox"],
|
fieldset label > input,
|
||||||
fieldset input[type="radio"] {
|
fieldset label > textarea,
|
||||||
|
fieldset label > .ui.dropdown,
|
||||||
|
fieldset label + .ui.dropdown {
|
||||||
|
margin-top: 0.28rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset label > input[type="checkbox"],
|
||||||
|
fieldset label > input[type="radio"] {
|
||||||
margin-right: 0.75em;
|
margin-right: 0.75em;
|
||||||
|
margin-top: 0 !important;
|
||||||
vertical-align: initial !important; /* overrides a semantic.css rule, remove when obsolete */
|
vertical-align: initial !important; /* overrides a semantic.css rule, remove when obsolete */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,6 +155,101 @@ textarea:focus,
|
||||||
color: var(--color-input-text);
|
color: var(--color-input-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* error messages */
|
||||||
|
fieldset label.error textarea,
|
||||||
|
fieldset label.error select,
|
||||||
|
fieldset label.error input,
|
||||||
|
.ui.form .fields.error .field textarea,
|
||||||
|
.ui.form .fields.error .field select,
|
||||||
|
.ui.form .fields.error .field input:not([type]),
|
||||||
|
.ui.form .fields.error .field input[type="date"],
|
||||||
|
.ui.form .fields.error .field input[type="datetime-local"],
|
||||||
|
.ui.form .fields.error .field input[type="email"],
|
||||||
|
.ui.form .fields.error .field input[type="number"],
|
||||||
|
.ui.form .fields.error .field input[type="password"],
|
||||||
|
.ui.form .fields.error .field input[type="search"],
|
||||||
|
.ui.form .fields.error .field input[type="tel"],
|
||||||
|
.ui.form .fields.error .field input[type="time"],
|
||||||
|
.ui.form .fields.error .field input[type="text"],
|
||||||
|
.ui.form .fields.error .field input[type="file"],
|
||||||
|
.ui.form .fields.error .field input[type="url"],
|
||||||
|
.ui.form .fields.error .field .ui.dropdown,
|
||||||
|
.ui.form .fields.error .field .ui.dropdown .item,
|
||||||
|
.ui.form .field.error .ui.dropdown,
|
||||||
|
.ui.form .field.error .ui.dropdown .text,
|
||||||
|
.ui.form .field.error .ui.dropdown .item,
|
||||||
|
.ui.form .field.error textarea,
|
||||||
|
.ui.form .field.error select,
|
||||||
|
.ui.form .field.error input:not([type]),
|
||||||
|
.ui.form .field.error input[type="date"],
|
||||||
|
.ui.form .field.error input[type="datetime-local"],
|
||||||
|
.ui.form .field.error input[type="email"],
|
||||||
|
.ui.form .field.error input[type="number"],
|
||||||
|
.ui.form .field.error input[type="password"],
|
||||||
|
.ui.form .field.error input[type="search"],
|
||||||
|
.ui.form .field.error input[type="tel"],
|
||||||
|
.ui.form .field.error input[type="time"],
|
||||||
|
.ui.form .field.error input[type="text"],
|
||||||
|
.ui.form .field.error input[type="file"],
|
||||||
|
.ui.form .field.error input[type="url"],
|
||||||
|
.ui.form .field.error select:focus,
|
||||||
|
.ui.form .field.error input:not([type]):focus,
|
||||||
|
.ui.form .field.error input[type="date"]:focus,
|
||||||
|
.ui.form .field.error input[type="datetime-local"]:focus,
|
||||||
|
.ui.form .field.error input[type="email"]:focus,
|
||||||
|
.ui.form .field.error input[type="number"]:focus,
|
||||||
|
.ui.form .field.error input[type="password"]:focus,
|
||||||
|
.ui.form .field.error input[type="search"]:focus,
|
||||||
|
.ui.form .field.error input[type="tel"]:focus,
|
||||||
|
.ui.form .field.error input[type="time"]:focus,
|
||||||
|
.ui.form .field.error input[type="text"]:focus,
|
||||||
|
.ui.form .field.error input[type="file"]:focus,
|
||||||
|
.ui.form .field.error input[type="url"]:focus {
|
||||||
|
background-color: var(--color-error-bg);
|
||||||
|
border-color: var(--color-error-border);
|
||||||
|
color: var(--color-error-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.form .fields.error .field .ui.dropdown,
|
||||||
|
.ui.form .field.error .ui.dropdown,
|
||||||
|
.ui.form .fields.error .field .ui.dropdown:hover,
|
||||||
|
.ui.form .field.error .ui.dropdown:hover {
|
||||||
|
border-color: var(--color-error-border) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.form .fields.error .field .ui.dropdown .menu .item:hover,
|
||||||
|
.ui.form .field.error .ui.dropdown .menu .item:hover {
|
||||||
|
background-color: var(--color-error-bg-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.form .fields.error .field .ui.dropdown .menu .active.item,
|
||||||
|
.ui.form .field.error .ui.dropdown .menu .active.item {
|
||||||
|
background-color: var(--color-error-bg-active) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.form .fields.error .dropdown .menu,
|
||||||
|
.ui.form .field.error .dropdown .menu {
|
||||||
|
border-color: var(--color-error-border) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:-webkit-autofill,
|
||||||
|
input:-webkit-autofill:focus,
|
||||||
|
input:-webkit-autofill:hover,
|
||||||
|
input:-webkit-autofill:active,
|
||||||
|
.ui.form .field.field input:-webkit-autofill,
|
||||||
|
.ui.form .field.field input:-webkit-autofill:focus,
|
||||||
|
.ui.form .field.field input:-webkit-autofill:hover,
|
||||||
|
.ui.form .field.field input:-webkit-autofill:active {
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: var(--color-text);
|
||||||
|
box-shadow: 0 0 0 100px var(--color-primary-light-6) inset !important;
|
||||||
|
border-color: var(--color-primary-light-4) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.form .field.muted {
|
||||||
|
opacity: var(--opacity-disabled);
|
||||||
|
}
|
||||||
|
|
||||||
.ui.form .field > label,
|
.ui.form .field > label,
|
||||||
.ui.form .inline.fields > label,
|
.ui.form .inline.fields > label,
|
||||||
.ui.form .inline.fields .field > label,
|
.ui.form .inline.fields .field > label,
|
||||||
|
@ -400,14 +508,12 @@ textarea:focus,
|
||||||
.repository.new.fork form .header {
|
.repository.new.fork form .header {
|
||||||
padding-left: 280px !important;
|
padding-left: 280px !important;
|
||||||
}
|
}
|
||||||
.repository.new.repo form .inline.field > label,
|
|
||||||
.repository.new.migrate form .inline.field > label,
|
.repository.new.migrate form .inline.field > label,
|
||||||
.repository.new.fork form .inline.field > label {
|
.repository.new.fork form .inline.field > label {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
width: 250px !important;
|
width: 250px !important;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
.repository.new.repo form .help,
|
|
||||||
.repository.new.migrate form .help,
|
.repository.new.migrate form .help,
|
||||||
.repository.new.fork form .help {
|
.repository.new.fork form .help {
|
||||||
margin-left: 265px !important;
|
margin-left: 265px !important;
|
||||||
|
@ -417,10 +523,8 @@ textarea:focus,
|
||||||
.repository.new.fork form .optional .title {
|
.repository.new.fork form .optional .title {
|
||||||
margin-left: 250px !important;
|
margin-left: 250px !important;
|
||||||
}
|
}
|
||||||
.repository.new.repo form .inline.field > input,
|
|
||||||
.repository.new.migrate form .inline.field > input,
|
.repository.new.migrate form .inline.field > input,
|
||||||
.repository.new.fork form .inline.field > input,
|
.repository.new.fork form .inline.field > input,
|
||||||
.repository.new.repo form .inline.field > textarea,
|
|
||||||
.repository.new.migrate form .inline.field > textarea,
|
.repository.new.migrate form .inline.field > textarea,
|
||||||
.repository.new.fork form .inline.field > textarea {
|
.repository.new.fork form .inline.field > textarea {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
@ -440,7 +544,6 @@ textarea:focus,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository.new.repo form .dropdown .text,
|
|
||||||
.repository.new.migrate form .dropdown .text,
|
.repository.new.migrate form .dropdown .text,
|
||||||
.repository.new.fork form .dropdown .text {
|
.repository.new.fork form .dropdown .text {
|
||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
|
@ -453,7 +556,6 @@ textarea:focus,
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository.new.repo form .selection.dropdown,
|
|
||||||
.repository.new.migrate form .selection.dropdown,
|
.repository.new.migrate form .selection.dropdown,
|
||||||
.repository.new.fork form .selection.dropdown,
|
.repository.new.fork form .selection.dropdown,
|
||||||
.repository.new.fork form .field a {
|
.repository.new.fork form .field a {
|
||||||
|
@ -490,10 +592,6 @@ textarea:focus,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository.new.repo .ui.form .selection.dropdown:not(.owner) {
|
|
||||||
width: 50% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
.repository.new.repo .ui.form .selection.dropdown:not(.owner) {
|
.repository.new.repo .ui.form .selection.dropdown:not(.owner) {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository .owner.dropdown {
|
|
||||||
min-width: 40% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.repository .unicode-escaped .escaped-code-point[data-escaped]::before {
|
.repository .unicode-escaped .escaped-code-point[data-escaped]::before {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
content: attr(data-escaped);
|
content: attr(data-escaped);
|
||||||
|
|
Loading…
Reference in a new issue