Custom UI elements (#291)
This commit is contained in:
parent
2deffbc622
commit
ce47e69b8a
|
@ -576,9 +576,6 @@ html:not(.usercss) .applies-to li:last-child .add-applies-to {
|
||||||
top: 1em;
|
top: 1em;
|
||||||
margin: 1ex 0;
|
margin: 1ex 0;
|
||||||
}
|
}
|
||||||
.firefox .beautify-options > label input {
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
.beautify-options:after {
|
.beautify-options:after {
|
||||||
clear: both;
|
clear: both;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -808,10 +805,4 @@ html:not(.usercss) .usercss-only,
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@supports (-moz-appearance: none) {
|
|
||||||
#header button {
|
|
||||||
padding: 0 3px 2px;
|
|
||||||
}
|
|
||||||
}
|
|
82
global.css
82
global.css
|
@ -1,3 +1,39 @@
|
||||||
|
button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
user-select: none;
|
||||||
|
padding: 2px 7px;
|
||||||
|
border: 1px solid hsl(0, 0%, 62%);
|
||||||
|
font: 400 13.3333px Arial;
|
||||||
|
color: #000;
|
||||||
|
background-color: hsl(0, 0%, 100%);
|
||||||
|
background: url(../images/button.png)repeat-x;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
transition: background-color .25s, border-color .25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: hsl(0, 0%, 95%);
|
||||||
|
border-color: hsl(0, 0%, 52%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For some odd reason these hovers appear lighter than all other button hovers in every browser */
|
||||||
|
#message-box-buttons button:hover {
|
||||||
|
background-color: hsl(0, 0%, 90%);
|
||||||
|
border-color: hsl(0, 0%, 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:not([type]) {
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
|
height: 22px;
|
||||||
|
min-height: 22px!important;
|
||||||
|
line-height: 22px;
|
||||||
|
padding: 0 3px;
|
||||||
|
font: 400 13.3333px Arial;
|
||||||
|
border: 1px solid hsl(0, 0%, 66%);
|
||||||
|
}
|
||||||
|
|
||||||
.svg-icon.checked {
|
.svg-icon.checked {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
|
@ -13,12 +49,11 @@ input[type="checkbox"]:not(.slider):checked + .svg-icon.checked {
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"]:not(.slider) {
|
input[type="checkbox"]:not(.slider) {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
-moz-appearance: none;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
pointer-events: none;
|
|
||||||
border: 1px solid hsl(0, 0%, 46%);
|
border: 1px solid hsl(0, 0%, 46%);
|
||||||
height: 12px;
|
height: 12px;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
|
@ -63,17 +98,14 @@ select {
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
color: currentColor;
|
font: 400 13.3333px Arial;
|
||||||
|
color: #000;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 1px solid hsl(0, 0%, 66%);
|
border: 1px solid hsl(0, 0%, 66%);
|
||||||
padding: 0 20px 0 6px;
|
padding: 0 20px 0 6px;
|
||||||
transition: color .5s;
|
transition: color .5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.firefox select {
|
|
||||||
padding: 0 20px 0 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-resizer {
|
.select-resizer {
|
||||||
display: inline-flex!important;
|
display: inline-flex!important;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
@ -86,7 +118,7 @@ select {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
fill: currentColor;
|
fill: #000;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
right: 4px;
|
right: 4px;
|
||||||
|
@ -101,12 +133,38 @@ select {
|
||||||
.moz-appearance-bug input[type="checkbox"] {
|
.moz-appearance-bug input[type="checkbox"] {
|
||||||
-moz-appearance: checkbox !important;
|
-moz-appearance: checkbox !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-moz-focus-inner {
|
.firefox select {
|
||||||
border: 0;
|
font-size: 13px;
|
||||||
|
padding: 0 20px 0 2px;
|
||||||
|
line-height: 22px!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
transform: scale(1); /* de-blur */
|
transform: scale(1); /* de-blur */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We can customize everything about number inputs except arrows. They're horrible in Linux FF, so we'll hide them unless hovered or focused. */
|
||||||
|
.firefox.non-windows input[type=number] {
|
||||||
|
-moz-appearance: textfield;
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
|
border: 1px solid hsl(0, 0%, 66%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.firefox.non-windows input[type="number"]:hover,
|
||||||
|
.firefox.non-windows input[type="number"]:focus {
|
||||||
|
-moz-appearance: number-input;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Firefox cannot handle fractions in font-size */
|
||||||
|
.firefox button:not(.install) {
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 13px;
|
||||||
|
padding: 3px 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.firefox.moz-appearance-bug button:not(.install) {
|
||||||
|
padding: 2px 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
images/button.png
Normal file
BIN
images/button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 203 B |
|
@ -259,7 +259,7 @@
|
||||||
<button id="check-all-updates-force" class="hidden" i18n-text="checkAllUpdatesForce"></button>
|
<button id="check-all-updates-force" class="hidden" i18n-text="checkAllUpdatesForce"></button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p id="add-style-wrapper">
|
<div id="add-style-wrapper">
|
||||||
<a href="edit.html">
|
<a href="edit.html">
|
||||||
<button id="add-style-label" i18n-text="addStyleLabel"></button>
|
<button id="add-style-label" i18n-text="addStyleLabel"></button>
|
||||||
</a>
|
</a>
|
||||||
|
@ -275,7 +275,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<details id="options" data-pref="manage.options.expanded">
|
<details id="options" data-pref="manage.options.expanded">
|
||||||
|
|
||||||
|
|
|
@ -84,23 +84,28 @@ select {
|
||||||
|
|
||||||
#header a[href^="edit"] {
|
#header a[href^="edit"] {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#add-style-label {
|
#add-style-wrapper {
|
||||||
margin-right: .25em;
|
display: flex;
|
||||||
margin-bottom: .25em;
|
align-items: center;
|
||||||
|
padding-bottom: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#add-style-as-usercss-wrapper {
|
#add-style-as-usercss-wrapper {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
margin-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#add-style-as-usercss-wrapper:not(:hover) input:not(:checked) ~ a svg {
|
#add-style-as-usercss-wrapper:not(:hover) input:not(:checked) ~ a svg {
|
||||||
fill: #aaa;
|
fill: #aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
#usercss-wiki svg {
|
#add-style-as-usercss-wrapper #usercss-wiki {
|
||||||
margin-top: -4px;
|
position: absolute;
|
||||||
|
right: -20px;
|
||||||
|
top: -3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#installed {
|
#installed {
|
||||||
|
@ -256,8 +261,7 @@ select {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* collapsibles */
|
/* collapsibles */
|
||||||
#header details:not(#filters),
|
#header details:not(#filters) {
|
||||||
#add-style-wrapper {
|
|
||||||
padding-bottom: .7em;
|
padding-bottom: .7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -825,8 +829,14 @@ input[id^="manage.newUI"] {
|
||||||
#search {
|
#search {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
margin: 0.25rem 0 0;
|
margin: 0.25rem 0 0;
|
||||||
padding-left: 0.25rem;
|
background: #fff;
|
||||||
border-width: 1px;
|
height: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 3px 3px 3px 4px;
|
||||||
|
font: 400 12px Arial;
|
||||||
|
color: #000;
|
||||||
|
border: 1px solid hsl(0, 0%, 66%);
|
||||||
|
border-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-wrapper .info {
|
#search-wrapper .info {
|
||||||
|
|
|
@ -27,6 +27,56 @@ body {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.firefox button {
|
||||||
|
-moz-appearance: none;
|
||||||
|
user-select: none;
|
||||||
|
padding: 3px 7px;
|
||||||
|
border: 1px solid hsl(0, 0%, 62%);
|
||||||
|
font: 400 13px Arial;
|
||||||
|
line-height: 13px;
|
||||||
|
color: #000;
|
||||||
|
background-color: hsl(0, 0%, 100%);
|
||||||
|
background: url(../images/button.png)repeat-x;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
transition: background-color .25s, border-color .25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.firefox button:hover {
|
||||||
|
background-color: hsl(0, 0%, 95%);
|
||||||
|
border-color: hsl(0, 0%, 52%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.firefox.moz-appearance-bug button {
|
||||||
|
padding: 2px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:-webkit-any(button,input[type="button"],input[type="submit"]) {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
user-select: none;
|
||||||
|
padding: 3px 7px;
|
||||||
|
border: 1px solid hsl(0, 0%, 62%);
|
||||||
|
border-radius: 0;
|
||||||
|
font: 400 13.3333px Arial;
|
||||||
|
color: hsl(0, 0%, 0%);
|
||||||
|
background-color: hsl(0, 0%, 100%);
|
||||||
|
background-image: url(../images/button.png);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
transition: background-color .25s, border-color .25s;
|
||||||
|
text-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
min-height: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
:enabled:hover:-webkit-any(select,input[type="checkbox"],input[type="radio"],:-webkit-any(button,input[type="button"],input[type="submit"])) {
|
||||||
|
background-color: hsl(0, 0%, 95%);
|
||||||
|
background-image: url(../images/button.png);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
text-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
border-color: hsl(0, 0%, 52%);
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 401px) {
|
@media (min-width: 401px) {
|
||||||
.firefox body {
|
.firefox body {
|
||||||
width: calc(100% - 6px); /* TODO: rework to avoid compensating padding of 'html.firefox .block' */
|
width: calc(100% - 6px); /* TODO: rework to avoid compensating padding of 'html.firefox .block' */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user