Revision control

Copy as Markdown

Other Tools

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
:root {
--vcard-delete-button-color: light-dark(var(--color-red-60), var(--color-red-40));
--vcard-remove-color: light-dark(var(--color-red-60), var(--color-red-40));
}
.addr-book-edit-display-nickname {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(30em, 1fr));
column-gap: 2em;
}
vcard-edit input[type="text"],
vcard-edit input[type="email"],
vcard-edit input[type="url"],
vcard-edit input[type="tel"],
vcard-edit input[type="number"],
vcard-edit input[type="date"],
vcard-edit .vcard-type-selection,
vcard-tz select:not([size], [multiple]),
vcard-special-date select:not([size], [multiple]) {
line-height: 1;
padding-inline: 6px;
margin: 0;
border: var(--input-border-density) solid var(--toolbar-field-border-color);
min-height: initial;
height: var(--in-content-button-height);
color: inherit;
margin-block-end: 3px;
margin-inline-end: 3px;
font-weight: normal;
}
vcard-edit {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(30em, 1fr));
column-gap: 2em;
grid-template-rows: masonry;
row-gap: 30px;
color: var(--sidebar-text-color);
--input-border-density: 1px;
& label[for] {
margin-block-end: 6px;
font-weight: 600;
}
& input[type="text"],
& input[type="email"],
& input[type="url"],
& input[type="tel"],
& input[type="date"] {
/* it should be 2em but input doesn't include the border */
height: calc(var(--in-content-button-height) - 2px);
}
& vcard-impp input[type="text"] {
flex: 1;
}
& input[type="email"] {
width: -moz-available;
}
& input[type="url"],
& input[type="tel"] {
flex: 1;
}
& input[type="number"] {
padding-inline-end: 0;
}
& select:not([size]) {
border-color: var(--in-content-button-border-color);
-moz-context-properties: stroke;
stroke: currentColor;
background-position-x: right 6px;
padding-inline-end: 15px;
}
&:dir(rtl) {
background-position-x: left 6px;
}
& select:not([size], [multiple]) {
padding-inline: 6px 22px;
padding-block: 0;
margin-block-end: 0;
}
& select:user-invalid {
outline: 2px solid var(--in-content-border-invalid);
outline-offset: -1px;
}
& textarea {
/* 3px is for the margin-end. */
width: calc(100% - 3px);
box-sizing: border-box;
border: var(--input-border-density) solid var(--toolbar-field-border-color);
margin-block: 0 3px;
margin-inline: 0 3px;
resize: vertical;
}
}
#addr-book-edit-n {
grid-column: 1 / -1;
}
/* N field styles */
vcard-n {
display: flex;
align-items: end;
justify-content: flex-start;
flex-wrap: wrap;
gap: 6px;
--button-dimension: 24px;
}
.n-list-component {
display: inline-flex;
flex-direction: column;
& button {
min-width: auto;
min-height: auto;
display: inline-flex;
margin: 0;
padding: 3px;
border: none;
z-index: 2;
margin-block-end: 9px;
border-radius: 8px;
}
& button img {
-moz-context-properties: fill;
fill: currentColor;
width: 9px;
height: 9px;
}
& button[hidden] {
display: none;
}
}
#n-list-component-prefix,
#n-list-component-suffix {
flex: 0 0 0%;
& input {
width: 10ch;
box-sizing: border-box;
}
}
#n-list-component-firstname,
#n-list-component-middlename,
#n-list-component-lastname {
flex: 1 0 0%;
& input {
min-width: 20ch;
box-sizing: border-box;
width: 100%;
}
}
#n-list-component-middlename.hasButton {
flex: 0 0 auto;
}
/* Display name / Full name / Nick name styles */
vcard-fn,
vcard-nickname {
display: flex;
flex-direction: column;
gap: 6px;
margin-block-start: 12px;
& label[for] {
margin-block-end: 0;
}
}
.vcard-checkbox {
display: flex;
align-items: center;
}
/**
* Shows the "Default" table header for emails.
*/
.default-table-header {
position: relative;
& legend {
/* The legend is positioned absolute over the table headers. */
position: absolute;
}
/* Imitates the legend element. */
& #addr-book-edit-email-default {
font-weight: 400;
/* This is a th so instead of a margin a padding is used. */
padding-block: 0 6px;
& span {
/* The box height of the th has to fully imitate the legend element. */
/* That's why the font size get adjusted directly on the span. */
font-size: 1rem;
}
}
}
/* Email field styles */
#addr-book-edit-email {
& :is(th, td) {
padding: 0;
}
& td.email-column {
width: 100%;
}
/* Email fieldset styles */
& table {
width: 100%;
border-collapse: collapse;
}
}
.default-column {
text-align: center;
}
#vcard-email {
& input[type="checkbox"]:not([hidden]) {
border-radius: 50%;
width: 16px;
height: 16px;
margin-inline: 0;
margin-block: 0 3px;
display: inline-grid;
&:checked {
background-image: none;
background-color: transparent;
border-color: var(--in-content-primary-button-background);
position: relative;
&:enabled {
&:hover {
background-color: transparent;
border-color: var(--in-content-primary-button-background-hover);
}
&:active {
border-color: var(--in-content-primary-button-background-active);
}
}
&::before {
content: "";
display: block;
height: 8px;
width: 8px;
background-color: var(--in-content-primary-button-background);
border-radius: 50%;
position: absolute;
inset: 3px;
&:enabled {
&:hover {
background-color: var(--in-content-primary-button-background-hover);
}
&:active {
background-color: var(--in-content-primary-button-background-active);
}
}
}
}
}
}
#addr-book-edit-address {
display: flex;
flex-direction: column;
}
.screen-reader-only {
position: absolute;
clip-path: inset(50%);
}
vcard-url,
vcard-tel,
vcard-impp,
vcard-special-date {
display: flex;
}
vcard-special-date {
margin-block-end: 6px;
}
.fieldset-reset {
margin: 0;
padding: 0;
border-style: none;
}
.fieldset-grid {
display: grid;
grid-template-columns: min-content auto;
}
.addr-book-edit-fieldset legend,
#addr-book-edit-email-default {
margin-block: 0 6px;
font-size: 1.1rem;
line-height: 1.2;
background-color: transparent;
font-weight: 600;
margin-inline-start: 0;
padding-inline: 0;
}
.vcard-year-month-day-container {
display: flex;
align-items: center;
& select:not([size], [multiple]),
& input[type="number"] {
margin-block-end: 0;
margin-inline: 0;
background-color: var(--in-content-box-background);
border-color: var(--toolbar-field-border-color);
}
& select {
&.vcard-month-select {
border-radius: 0;
border-inline-end-width: 0;
}
&.vcard-day-select {
border-start-start-radius: 0;
border-end-start-radius: 0;
}
}
& input[type="number"] {
box-sizing: border-box;
border-start-end-radius: 0;
border-end-end-radius: 0;
border-inline-end-width: 0;
&::-moz-number-spin-box {
padding-inline-end: 2px;
}
}
}
vcard-adr select {
grid-column: 1 / 2;
}
.vcard-adr-inputs:not([hidden]) {
display: flex;
flex-direction: column;
grid-column: 2 / 3;
}
.addr-book-edit-fieldset-button {
background-color: transparent;
padding: 3px;
border: none;
font-size: 1rem;
font-weight: 500;
border-radius: 3px;
min-height: auto;
width: fit-content;
&:enabled {
&:is(:hover, :active, :hover:active) {
background-color: var(--in-content-button-background);
}
}
}
.add-property-button {
-moz-context-properties: fill;
color: var(--in-content-primary-button-background);
fill: var(--in-content-primary-button-text-color);
&:enabled {
&:is(:hover, :active, :hover:active) {
color: var(--in-content-primary-button-background);
}
}
&::before {
position: relative;
display: block;
content: "";
border-radius: 8px;
background-color: var(--in-content-primary-button-background);
width: 13px;
height: 13px;
background-image: url("chrome://global/skin/icons/add.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 9px;
fill: unset;
stroke: unset;
fill-opacity: unset;
}
}
.remove-property-button {
color: var(--vcard-remove-color);
margin-block-end: 3px;
-moz-context-properties: fill, stroke;
fill: color-mix(in srgb, currentColor 20%, transparent);
stroke: currentColor;
align-self: center;
&::before {
width: 12px;
height: 12px;
background-image: var(--icon-subtract-circle-sm);
background-repeat: no-repeat;
background-position: center;
}
&:enabled {
&:is(:hover, :active, :hover:active) {
color: var(--color-white);
background-color: var(--vcard-delete-button-color);
}
}
/* Remove button special cases. */
#vcard-email & {
padding: 2px;
}
vcard-special-date & {
margin-inline-start: 3px;
margin-block-end: 0;
}
.add-property-button + & {
margin-inline-start: 0;
}
}
vcard-tz {
display: inline-flex;
flex-direction: column;
& .remove-property-button {
margin-block-start: 3px;
align-self: auto;
}
}