8000 gaia/apps/settings/style/lists.css at v1.2 · EricRahm/gaia · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
528 lines (443 loc) · 9.6 KB

lists.css

File metadata and controls

528 lines (443 loc) · 9.6 KB
/**
* Table View
* line height = 6rem, border included
*/
ul {
margin: 0;
padding: 0;
overflow: hidden;
list-style: none;
background: url(images/document_bg.png);
}
ul li {
-moz-box-sizing: border-box;
position: relative;
min-height: 6rem;
margin: 0 1.5rem;
border-bottom: 0.1rem solid #e6e6e3;
color: #000;
}
ul li:last-child {
border-bottom: none;
}
ul li.sound-setting {
min-height: 7.9rem;
}
ul li label:not([for]) {
background: none;
}
ul li > a,
ul li > span {
display: block;
text-decoration: none;
outline: 0;
color: #000;
-moz-box-sizing: border-box;
height: 6rem;
font-size: 1.9rem;
line-height: 6rem;
padding: 0 3rem;
margin: 0 -1.5rem;
}
ul li.active a,
ul li.active span,
ul li:not([aria-disabled="true"]) > small + a:active,
ul li:not([aria-disabled="true"]) > a[href]:active,
ul li:not([aria-disabled="true"]) > small + a:focus,
ul li:not([aria-disabled="true"]) > a[href]:focus {
background-color: #b2f2ff;
color: #222;
}
ul li[aria-disabled="true"] > a {
color: #797e80;
opacity: 0.6;
pointer-events: none;
}
ul > li > progress {
display: inline-block;
margin: 0;
padding: 0;
}
ul > li > progress + span {
display: inline-block;
vertical-align: middle;
margin: 0;
padding: 0 0 0 1rem;
color: #505b5b;
font-size: 1.4rem;
}
/* description + value on the same line */
ul li > a span {
position: absolute;
right: 1.5rem;
color: #505859;
}
/* text ellipsis */
ul li > * {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* sublines */
ul li > small {
position: absolute;
left: 1.5rem;
right: 1.5rem;
top: 50%;
padding-top: 0.4rem;
font-size: 1.4rem;
color: #505859;
/* click/tap events should be caught by the <a> element below the <small> */
pointer-events: none;
}
ul li > label.pack-checkbox + small,
ul li > label.pack-radio + small {
right: 6.1rem;
}
ul li > label.pack-switch + small {
right: 9rem;
}
/* required for empty elements like Bluetooth */
ul li > small:not(:empty) + a,
ul li > small:not(:empty) + span {
line-height: 4.4rem;
padding-bottom: 0.1rem; /* Bug 903438 */
}
/******************************************************************************
* Boolean inputs
*/
ul li button,
ul li a[role="button"] {
position: relative;
top: 1.1rem;
width: 100%;
}
/* custom styles for boolean inputs (see /shared/style/switches.css) */
ul li label {
text-transform: none;
}
ul li > label:not([for]),
ul li > label.pack-checkbox,
ul li > label.pack-radio,
ul li > label.pack-switch {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
ul li > label.pack-checkbox > span,
ul li > label.pack-radio > span,
ul li > label.pack-switch > input + span {
left: auto;
right: 0;
}
ul li > label.pack-checkbox ~ a,
ul li > label.pack-radio ~ a {
padding-right: 6.1rem;
}
ul li > label.pack-radio ~ p {
padding-right: 3rem;
}
ul li > label.pack-switch ~ a {
padding-right: 9rem;
}
ul li > label.pack-radio ~ a {
padding-right: 5.9rem;
}
ul li > label.pack-checkbox:active ~ a,
ul li > label.pack-radio:active ~ a,
ul li > label.pack-switch:active ~ a {
background-color: #b2f2ff;
color: #222;
}
ul li > label:not([for]):only-child {
position: relative;
padding: 0.5rem 0 1.5rem 0;
}
/******************************************************************************
* Field inputs
*/
ul li p {
font-size: 1.9rem;
line-height: 1.9rem;
font-weight: 400;
margin: 0;
padding: 1.5rem 1.5rem 1rem;
}
ul li p + label:not([for]) {
top: 2.5rem;
height: calc(100% - 2.5rem);
}
ul li p + input[type="text"],
ul li p + input[type="number"],
ul li p + input[type="tel"],
ul li p + input[type="password"] {
width: 100%;
margin-bottom: 1.5rem;
}
/******************************************************************************
* Range inputs
*/
input[type=range] {
-moz-appearance: none;
border: none;
background: none;
}
input[type=range]:-moz-focusring {
outline: none;
}
ul li > label input[type="range"] {
position: relative;
top: calc(50% - 1.5rem);
left: 5rem;
right: 7rem;
height: 3rem;
width: calc(100% - 15rem);
}
input[type=range]::-moz-range-track {
height: 0.1rem;
background-color: #7e7e7e;
}
input[type=range]::-moz-range-progress {
height: 0.3rem;
background-color: #01c5ed;
}
input[type=range]::-moz-range-thumb {
width: 2.8rem;
height: 2.8rem;
border: solid 0.1rem transparent;
border-radius: 3rem;
transition: border 0.15s ease;
-moz-box-sizing: border-box;
background: url(images/range_thumb.png) no-repeat 50% 50%;
background-size: 2.8rem 2.8rem;
}
input[type=range]:active::-moz-range-thumb {
border: solid 0.4rem #01c5ed;
}
ul li.sound-setting > label input[type="range"] {
margin: 0 auto;
width: calc(100% - 3rem);
left: 1.5rem;
}
ul li#brightness-manual > label input[type="range"] {
margin: 0 auto;
width: calc(100% - 10rem);
}
/**
* Polyfill until input[type=range] is natively supported by Gecko:
* https://bugzilla.mozilla.org/show_bug.cgi?id=344618
*
* The JS polyfill transforms this:
*
* <label>
* <input type="range" value="60" />
* </label>
*
* into this:
*
* <label class="bug344618_polyfill">
* <div>
* <span style="width: 60%"></span>
* <span style="left: 60%"></span>
* </div>
* <input type="range" />
* </label>
*/
ul li > label.bug344618_polyfill input {
display: none;
}
/* slider */
ul li > label.bug344618_polyfill div:before {
content: "";
position: absolute;
top: calc(50% - 0.1rem);
left: 0;
right: 0;
height: 0.1rem;
border-top: 0.1rem solid #7e7e7e;
}
ul li > label.bug344618_polyfill div {
position: relative;
top: calc(50% - 1.5rem);
left: 1.5rem;
right: 1.5rem;
height: 3rem;
width: calc(100% - 3rem);
}
/* fill */
ul li > label.bug344618_polyfill div span:first-child {
position: absolute;
display: block;
top: calc(50% - 0.15rem);
width: 4rem;
height: 0.3rem;
background-color: #01c5ed;
}
/* throbber */
ul li > label.bug344618_polyfill div span:last-child {
position: absolute;
top: 50%;
margin: -2rem 0 0 -2rem;
display: block;
width: 3.8rem;
height: 3.8rem;
outline: solid 0.1rem transparent;
outline-offset: -1rem;
-moz-outline-radius: 3rem;
transition: outline 0.15s ease;
background: url(images/range_thumb.png) no-repeat 50% 50%;
background-size: 2.8rem 2.8rem;
}
ul li > label.bug344618_polyfill div span:last-child:active {
outline: solid 0.4rem #01c5ed;
}
/******************************************************************************
* Select boxes
*/
ul li select {
font-size: 1.9rem;
height: 3rem;
line-height: 3rem;
text-align: center;
}
/* half-width select boxes */
ul li span select {
display: inline-block;
position: absolute;
top: 1.5rem;
right: 3rem;
width: calc(50% - 2rem);
}
/* full-width select boxes */
ul li p + select {
display: block;
width: calc(100% - 15rem);
margin: -1rem 3rem 1rem 12rem;
}
/******************************************************************************
* Fake select boxes
*/
.fake-select {
position: relative;
display: block;
padding: 0;
margin-bottom: 1.5rem;
height: 3.8rem;
}
a + .fake-select {
margin-top: -1rem;
}
.fake-select.small {
display: inline-block;
vertical-align: top;
}
.fake-select > button {
display: block;
top: 0;
left: 0;
width: 100%;
}
.fake-select > select {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 3.8rem;
border: none;
background: red;
opacity: 0;
}
p > .fake-select {
margin: 1rem -1.5rem 0.5rem;
}
/* */
section[role="region"] > ul > li > p + .fake-select {
padding-top: 0;
margin-top: -0.8rem;
}
/******************************************************************************
* Progress, Meter
*/
ul > li progress[value] {
display: block;
width: calc(100% - 3rem);
height: 3rem;
margin: 3rem auto;
background: #e7e7e7;
border: 0.1rem solid #b6b6b6;
border-radius: 0.3rem;
}
ul > li progress[value]::-moz-progress-bar {
margin: 1px;
height: calc(100% - 0.2rem);
border-radius: 0.2rem;
background-color: #82c72c;
}
/******************************************************************************
* Definition lists
*/
dl > * {
font-size: 1.7rem;
}
dl dt {
padding-left: 3rem;
font-weight: 500;
border-bottom: 0.1rem solid black;
}
dl dd {
margin: 0;
padding: 1rem 3rem;
border-bottom: 0.1rem solid #e6e6e3; /* same as "ul li" */
}
/******************************************************************************
* Right-to-Left layout
*/
/* definition lists */
html[dir="rtl"] dl dt {
padding-left: inherit;
padding-right: 3rem;
}
/* half-width select boxes */
html[dir="rtl"] ul li span select {
left: 3rem;
right: inherit;
}
/* full-width select boxes */
html[dir="rtl"] ul li p + select {
margin: -1rem 12rem 1rem 3rem;
}
/* boolean inputs */
html[dir="rtl"] ul li button,
html[dir="rtl"] ul li a[role="button"] {
left: inherit;
right: 3rem;
}
html[dir="rtl"] ul li > label.pack-checkbox > span,
html[dir="rtl"] ul li > label.pack-radio > span,
html[dir="rtl"] ul li > label.pack-switch > input + span {
left: 9rem; /* XXX we use "right: 3rem" for LTR layouts... */
right: inherit;
}
html[dir="rtl"] ul li > label.pack-checkbox ~ a,
html[dir="rtl"] ul li > label.pack-radio ~ a {
padding-left: 6.1rem;
padding-right: 3rem;
}
html[dir="rtl"] ul li > label.pack-switch ~ a {
padding-left: 9rem;
padding-right: 3rem;
}
/* description + value on the same line */
html[dir="rtl"] ul li > a span {
left: 3rem;
right: inherit;
}
/* main list items */
html[dir="rtl"] ul li > a,
html[dir="rtl"] ul li > span {
padding-left: inherit;
padding-right: 3rem;
}
0