aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-03 15:30:38 -0500
committerGitHub <noreply@github.com>2021-01-03 15:30:38 -0500
commit63971776a5db6ad0d3a68361f64a74aa9e78aff5 (patch)
treee4100c1e6e418cf26165708992ef75be62c9628d /ext/bg
parentd50d7a4a3a5e307838348726de331cf5eb283bff (diff)
CSS lint (#1201)
* Use single quotes instead of double * Install stylelint * Set up config * Update package/tests * Fix lint issues * Update CSS rules
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/css/context.css15
-rw-r--r--ext/bg/css/pitch-accents-preview.css2
-rw-r--r--ext/bg/css/popup-preview.css2
-rw-r--r--ext/bg/css/settings.css15
-rw-r--r--ext/bg/css/settings2.css51
5 files changed, 46 insertions, 39 deletions
diff --git a/ext/bg/css/context.css b/ext/bg/css/context.css
index 1c3f3204..773f79c6 100644
--- a/ext/bg/css/context.css
+++ b/ext/bg/css/context.css
@@ -18,7 +18,7 @@
body {
padding: 10px;
margin: 0;
- font-family: "Segoe UI", Tahoma, sans-serif;
+ font-family: 'Segoe UI', Tahoma, sans-serif;
font-size: 14px;
}
@@ -90,7 +90,7 @@ label {
padding: 0;
}
.link-group-icon[data-icon=chevron]::after {
- content: "";
+ content: '';
display: block;
width: 100%;
height: 100%;
@@ -139,8 +139,8 @@ body[data-loaded=true] .toggle-group {
display: block;
padding: 6px 12px;
font-size: 14px;
- font-weight: 400;
- line-height: 1.42857143;
+ font-weight: normal;
+ line-height: calc(20 / 14);
text-align: center;
white-space: nowrap;
cursor: pointer;
@@ -203,7 +203,7 @@ body[data-loaded=true] .toggle-group {
background-color: #ffffff;
background-image: linear-gradient(#ffffff, #e0e0e0);
background-repeat: repeat-x;
- box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
}
.toggle-off:focus,
.toggle-off:hover,
@@ -215,7 +215,7 @@ body[data-loaded=true] .toggle-group {
}
.toggle-off:active,
.toggle-handle:active {
- background-color:#d4d4d4;
+ background-color: #d4d4d4;
background-image: none;
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
border-color: #8c8c8c;
@@ -234,14 +234,13 @@ body[data-loaded=true] .toggle-group {
border: 1px solid #cccccc;
margin: 0;
padding: 2px 3px;
- margin: 0;
cursor: pointer;
}
.nav-button+.nav-button {
margin-left: -1px;
}
.nav-button::after {
- content: "";
+ content: '';
display: block;
width: 16px;
height: 16px;
diff --git a/ext/bg/css/pitch-accents-preview.css b/ext/bg/css/pitch-accents-preview.css
index cd731a99..cda9977e 100644
--- a/ext/bg/css/pitch-accents-preview.css
+++ b/ext/bg/css/pitch-accents-preview.css
@@ -27,7 +27,7 @@ body {
overflow: hidden;
width: 100%;
height: 100%;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: calc(20 / 14);
}
diff --git a/ext/bg/css/popup-preview.css b/ext/bg/css/popup-preview.css
index 88b6a8f3..2e1f191d 100644
--- a/ext/bg/css/popup-preview.css
+++ b/ext/bg/css/popup-preview.css
@@ -39,7 +39,7 @@ body {
overflow: hidden;
width: 100%;
height: 100%;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 14px;
}
diff --git a/ext/bg/css/settings.css b/ext/bg/css/settings.css
index a7a7bcde..7230f59d 100644
--- a/ext/bg/css/settings.css
+++ b/ext/bg/css/settings.css
@@ -76,11 +76,11 @@ html:root:not([data-options-general-result-output-mode=merge]) #dictionary-main-
.condition>.input-group-btn {
width: auto;
}
-.condition>.profile-condition-prefix:after {
- content: "IF";
+.condition>.profile-condition-prefix::after {
+ content: 'IF';
}
-.condition:nth-child(n+2)>.profile-condition-prefix:after {
- content: "AND";
+.condition:nth-child(n+2)>.profile-condition-prefix::after {
+ content: 'AND';
}
.profile-condition-prefix {
@@ -152,7 +152,7 @@ html:root:not([data-options-general-result-output-mode=merge]) #dictionary-main-
justify-content: center;
align-items: center;
}
-.scan-input-index:after {
+.scan-input-index::after {
display: block;
counter-increment: scan-input-id;
content: counter(scan-input-id);
@@ -265,7 +265,7 @@ html:root:not([data-options-general-result-output-mode=merge]) #dictionary-main-
width: 39px;
text-align: center;
}
-.generic-input-list .generic-input-prefix:after {
+.generic-input-list .generic-input-prefix::after {
counter-increment: generic-input-id;
content: counter(generic-input-id);
}
@@ -276,7 +276,6 @@ html:root:not([data-options-general-result-output-mode=merge]) #dictionary-main-
width: 100%;
min-height: 34px;
line-height: 18px;
- height: 96px;
resize: vertical;
font-family: 'Courier New', Courier, monospace;
white-space: pre;
@@ -395,7 +394,7 @@ html:root[data-operating-system=openbsd] [data-hide-for-operating-system~=openbs
.dictionary-details-table {
display: table;
- width: 100%
+ width: 100%;
}
.dictionary-details-entry {
diff --git a/ext/bg/css/settings2.css b/ext/bg/css/settings2.css
index 9d3d081d..1c3ab84a 100644
--- a/ext/bg/css/settings2.css
+++ b/ext/bg/css/settings2.css
@@ -67,7 +67,7 @@
--text-color-lighter: #888888;
--separator-color1: #cccccc;
--separator-color2: #eeeeee;
- --outline-item-background-color: rgba(13, 13, 13, 0.0);
+ --outline-item-background-color: rgba(13, 13, 13, 0);
--outline-item-background-color-hover: rgba(13, 13, 13, 0.15);
--warning-color: #96751c;
--warning-color-light: hsl(44, 80%, 65%);
@@ -116,7 +116,7 @@ body {
padding: 0;
border: none;
font-size: var(--font-size);
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: var(--text-color);
line-height: var(--line-height-default);
height: 100%;
@@ -130,9 +130,15 @@ ul {
margin: 0;
padding: 0 0 0 1.5em;
}
-p+p, p+ol, p+ul,
-ol+p, ol+ol, ol+ul,
-ul+p, ul+ol, ul+ul,
+p+p,
+p+ol,
+p+ul,
+ol+p,
+ol+ol,
+ol+ul,
+ul+p,
+ul+ol,
+ul+ul,
li {
margin: 0.425em 0;
}
@@ -326,8 +332,9 @@ h3 {
}
.sidebar:hover {
max-width: var(--sidebar-size);
- transition: max-width var(--animation-duration) ease-out 0.5s,
- box-shadow var(--animation-duration) ease-out;
+ transition:
+ max-width var(--animation-duration) ease-out 0.5s,
+ box-shadow var(--animation-duration) ease-out;
}
.sidebar-inner {
width: 100%;
@@ -455,9 +462,10 @@ h3 {
width: 100%;
min-width: 100%;
max-width: 100%;
- transition: width var(--animation-duration) ease-in-out,
- max-width var(--animation-duration) ease-in-out,
- box-shadow var(--animation-duration) ease-in-out;
+ transition:
+ width var(--animation-duration) ease-in-out,
+ max-width var(--animation-duration) ease-in-out,
+ box-shadow var(--animation-duration) ease-in-out;
}
.preview-sidebar-inner {
width: 100%;
@@ -807,7 +815,7 @@ select.short-height {
margin-right: calc(var(--modal-padding-horizontal) * -1);
}
.modal-body .settings-item+.settings-item {
- border-top: none
+ border-top: none;
}
.modal-body .settings-item-left {
padding-left: var(--modal-padding-horizontal);
@@ -1094,8 +1102,9 @@ button.popup-menu-item:disabled {
width: 100%;
min-width: 100%;
max-width: 100%;
- transition: width var(--animation-duration) ease-in-out,
- max-width var(--animation-duration) ease-in-out;
+ transition:
+ width var(--animation-duration) ease-in-out,
+ max-width var(--animation-duration) ease-in-out;
}
.fab-container-right-inner2 {
display: flex;
@@ -1128,7 +1137,7 @@ button.fab-button:active {
.fab-button-background {
position: absolute;
display: block;
- content: "";
+ content: '';
left: 0;
top: 0;
right: 0;
@@ -1264,7 +1273,7 @@ body.preview-sidebar-visible .fab-container-item.fab-container-item-popup-previe
}
.dictionary-details-table {
display: table;
- width: 100%
+ width: 100%;
}
.dictionary-details-entry {
display: table-row;
@@ -1332,7 +1341,7 @@ body.preview-sidebar-visible .fab-container-item.fab-container-item-popup-previe
flex: 0 0 auto;
min-width: 4em;
text-align: center;
- align-self: stretch
+ align-self: stretch;
}
.profile-entry-cell:nth-child(5) {
flex: 0 0 auto;
@@ -1426,10 +1435,10 @@ input[type=text].profile-entry-name-input {
margin-right: 0.25em;
}
.profile-condition-prefix::after {
- content: "if"
+ content: 'if';
}
.profile-condition:nth-child(n+2)>.profile-condition-prefix::after {
- content: "and"
+ content: 'and';
}
select.profile-condition-type,
select.profile-condition-operator {
@@ -1743,9 +1752,9 @@ code.anki-field-marker {
grid-template-columns: auto auto 1fr auto;
grid-template-rows: auto;
grid-template-areas:
- "index pattern-label pattern button"
- ". replacement-label replacement button"
- ". test-label test .";
+ 'index pattern-label pattern button'
+ '. replacement-label replacement button'
+ '. test-label test .';
column-gap: 0.25em;
row-gap: 0.25em;
align-items: stretch;