mirror of
https://github.com/picocss/pico.git
synced 2025-04-26 11:16:15 -04:00
input[type="reset"] styles merged with .secondary
This commit is contained in:
parent
f90359ad7b
commit
5b17286648
13 changed files with 137 additions and 142 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
29
css/pico.css
29
css/pico.css
|
@ -1015,25 +1015,10 @@ input[type=reset]:focus,
|
|||
0 0 0 var(--outline-width) var(--primary-focus);
|
||||
}
|
||||
|
||||
input[type=reset] {
|
||||
--background-color: var(--secondary);
|
||||
--border-color: var(--secondary);
|
||||
--color: var(--secondary-inverse);
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type=reset]:hover, input[type=reset]:active, input[type=reset]:focus {
|
||||
--background-color: var(--secondary-hover);
|
||||
--border-color: var(--secondary-hover);
|
||||
}
|
||||
input[type=reset]:focus {
|
||||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--secondary-focus);
|
||||
}
|
||||
|
||||
button.secondary,
|
||||
input[type=submit].secondary,
|
||||
input[type=button].secondary,
|
||||
input[type=reset].secondary,
|
||||
input[type=reset],
|
||||
[role=button].secondary {
|
||||
--background-color: var(--secondary);
|
||||
--border-color: var(--secondary);
|
||||
|
@ -1047,9 +1032,9 @@ input[type=submit].secondary:focus,
|
|||
input[type=button].secondary:hover,
|
||||
input[type=button].secondary:active,
|
||||
input[type=button].secondary:focus,
|
||||
input[type=reset].secondary:hover,
|
||||
input[type=reset].secondary:active,
|
||||
input[type=reset].secondary:focus,
|
||||
input[type=reset]:hover,
|
||||
input[type=reset]:active,
|
||||
input[type=reset]:focus,
|
||||
[role=button].secondary:hover,
|
||||
[role=button].secondary:active,
|
||||
[role=button].secondary:focus {
|
||||
|
@ -1060,11 +1045,12 @@ input[type=reset].secondary:focus,
|
|||
button.secondary:focus,
|
||||
input[type=submit].secondary:focus,
|
||||
input[type=button].secondary:focus,
|
||||
input[type=reset].secondary:focus,
|
||||
input[type=reset]:focus,
|
||||
[role=button].secondary:focus {
|
||||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--secondary-focus);
|
||||
}
|
||||
|
||||
button.contrast,
|
||||
input[type=submit].contrast,
|
||||
input[type=button].contrast,
|
||||
|
@ -1099,6 +1085,7 @@ input[type=reset].contrast:focus,
|
|||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--contrast-focus);
|
||||
}
|
||||
|
||||
button.outline,
|
||||
input[type=submit].outline,
|
||||
input[type=button].outline,
|
||||
|
@ -1123,6 +1110,7 @@ input[type=reset].outline:focus,
|
|||
--background-color: transparent;
|
||||
--color: var(--primary-hover);
|
||||
}
|
||||
|
||||
button.outline.secondary,
|
||||
input[type=submit].outline.secondary,
|
||||
input[type=button].outline.secondary,
|
||||
|
@ -1145,6 +1133,7 @@ input[type=reset].outline.secondary:focus,
|
|||
[role=button].outline.secondary:focus {
|
||||
--color: var(--secondary-hover);
|
||||
}
|
||||
|
||||
button.outline.contrast,
|
||||
input[type=submit].outline.contrast,
|
||||
input[type=button].outline.contrast,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
css/pico.min.css
vendored
2
css/pico.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -943,25 +943,10 @@ input[type=reset]:focus,
|
|||
0 0 0 var(--outline-width) var(--primary-focus);
|
||||
}
|
||||
|
||||
input[type=reset] {
|
||||
--background-color: var(--secondary);
|
||||
--border-color: var(--secondary);
|
||||
--color: var(--secondary-inverse);
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type=reset]:hover, input[type=reset]:active, input[type=reset]:focus {
|
||||
--background-color: var(--secondary-hover);
|
||||
--border-color: var(--secondary-hover);
|
||||
}
|
||||
input[type=reset]:focus {
|
||||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--secondary-focus);
|
||||
}
|
||||
|
||||
button.secondary,
|
||||
input[type=submit].secondary,
|
||||
input[type=button].secondary,
|
||||
input[type=reset].secondary,
|
||||
input[type=reset],
|
||||
[role=button].secondary {
|
||||
--background-color: var(--secondary);
|
||||
--border-color: var(--secondary);
|
||||
|
@ -975,9 +960,9 @@ input[type=submit].secondary:focus,
|
|||
input[type=button].secondary:hover,
|
||||
input[type=button].secondary:active,
|
||||
input[type=button].secondary:focus,
|
||||
input[type=reset].secondary:hover,
|
||||
input[type=reset].secondary:active,
|
||||
input[type=reset].secondary:focus,
|
||||
input[type=reset]:hover,
|
||||
input[type=reset]:active,
|
||||
input[type=reset]:focus,
|
||||
[role=button].secondary:hover,
|
||||
[role=button].secondary:active,
|
||||
[role=button].secondary:focus {
|
||||
|
@ -988,11 +973,12 @@ input[type=reset].secondary:focus,
|
|||
button.secondary:focus,
|
||||
input[type=submit].secondary:focus,
|
||||
input[type=button].secondary:focus,
|
||||
input[type=reset].secondary:focus,
|
||||
input[type=reset]:focus,
|
||||
[role=button].secondary:focus {
|
||||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--secondary-focus);
|
||||
}
|
||||
|
||||
button.contrast,
|
||||
input[type=submit].contrast,
|
||||
input[type=button].contrast,
|
||||
|
@ -1027,6 +1013,7 @@ input[type=reset].contrast:focus,
|
|||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--contrast-focus);
|
||||
}
|
||||
|
||||
button.outline,
|
||||
input[type=submit].outline,
|
||||
input[type=button].outline,
|
||||
|
@ -1051,6 +1038,7 @@ input[type=reset].outline:focus,
|
|||
--background-color: transparent;
|
||||
--color: var(--primary-hover);
|
||||
}
|
||||
|
||||
button.outline.secondary,
|
||||
input[type=submit].outline.secondary,
|
||||
input[type=button].outline.secondary,
|
||||
|
@ -1073,6 +1061,7 @@ input[type=reset].outline.secondary:focus,
|
|||
[role=button].outline.secondary:focus {
|
||||
--color: var(--secondary-hover);
|
||||
}
|
||||
|
||||
button.outline.contrast,
|
||||
input[type=submit].outline.contrast,
|
||||
input[type=button].outline.contrast,
|
||||
|
|
File diff suppressed because one or more lines are too long
2
css/pico.slim.min.css
vendored
2
css/pico.slim.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -92,35 +92,15 @@ input[type="reset"],
|
|||
}
|
||||
}
|
||||
|
||||
// Secondary button without .class
|
||||
input[type="reset"] {
|
||||
--background-color: var(--secondary);
|
||||
--border-color: var(--secondary);
|
||||
--color: var(--secondary-inverse);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
--background-color: var(--secondary-hover);
|
||||
--border-color: var(--secondary-hover);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--secondary-focus);
|
||||
}
|
||||
}
|
||||
|
||||
// .secondary, .contrast & .outline
|
||||
@if $enable-classes {
|
||||
button,
|
||||
input[type="submit"],
|
||||
input[type="button"],
|
||||
input[type="reset"],
|
||||
[role="button"] {
|
||||
|
||||
// Secondary
|
||||
&.secondary {
|
||||
button.secondary,
|
||||
input[type="submit"].secondary,
|
||||
input[type="button"].secondary,
|
||||
input[type="reset"],
|
||||
[role="button"].secondary {
|
||||
--background-color: var(--secondary);
|
||||
--border-color: var(--secondary);
|
||||
--color: var(--secondary-inverse);
|
||||
|
@ -141,7 +121,11 @@ input[type="reset"] {
|
|||
}
|
||||
|
||||
// Contrast
|
||||
&.contrast {
|
||||
button.contrast,
|
||||
input[type="submit"].contrast,
|
||||
input[type="button"].contrast,
|
||||
input[type="reset"].contrast,
|
||||
[role="button"].contrast {
|
||||
--background-color: var(--contrast);
|
||||
--border-color: var(--contrast);
|
||||
--color: var(--contrast-inverse);
|
||||
|
@ -161,7 +145,11 @@ input[type="reset"] {
|
|||
}
|
||||
|
||||
// Outline (primary)
|
||||
&.outline {
|
||||
button.outline,
|
||||
input[type="submit"].outline,
|
||||
input[type="button"].outline,
|
||||
input[type="reset"].outline,
|
||||
[role="button"].outline {
|
||||
--background-color: transparent;
|
||||
--color: var(--primary);
|
||||
|
||||
|
@ -174,7 +162,11 @@ input[type="reset"] {
|
|||
}
|
||||
|
||||
// Outline (secondary)
|
||||
&.outline.secondary {
|
||||
button.outline.secondary,
|
||||
input[type="submit"].outline.secondary,
|
||||
input[type="button"].outline.secondary,
|
||||
input[type="reset"].outline.secondary,
|
||||
[role="button"].outline.secondary {
|
||||
--color: var(--secondary);
|
||||
|
||||
&:hover,
|
||||
|
@ -185,7 +177,11 @@ input[type="reset"] {
|
|||
}
|
||||
|
||||
// Outline (contrast)
|
||||
&.outline.contrast {
|
||||
button.outline.contrast,
|
||||
input[type="submit"].outline.contrast,
|
||||
input[type="button"].outline.contrast,
|
||||
input[type="reset"].outline.contrast,
|
||||
[role="button"].outline.contrast {
|
||||
--color: var(--contrast);
|
||||
|
||||
&:hover,
|
||||
|
@ -194,6 +190,27 @@ input[type="reset"] {
|
|||
--color: var(--contrast-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@else {
|
||||
// Secondary button without .class
|
||||
input[type="reset"] {
|
||||
--background-color: var(--secondary);
|
||||
--border-color: var(--secondary);
|
||||
--color: var(--secondary-inverse);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
--background-color: var(--secondary-hover);
|
||||
--border-color: var(--secondary-hover);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
||||
0 0 0 var(--outline-width) var(--secondary-focus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue