Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Rounding - Square options in dialogs #604

Merged
merged 1 commit into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions css/leptonChrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,6 @@
--in-content-border-color: color-mix(in srgb, currentColor 41%, transparent) !important;
}
#viewGroup > radio {
border-radius: 8px !important;
padding: var(--in-content-button-vertical-padding) var(--in-content-button-horizontal-padding) !important;
margin: 4px !important;
list-style-image: none !important;
Expand All @@ -2255,6 +2254,11 @@
fill: currentColor !important;
color: var(--in-content-deemphasized-text) !important; /* FieldText */
}
@supports not -moz-bool-pref("userChrome.rounding.square_button") {
#viewGroup > radio {
border-radius: 8px !important;
}
}
#viewGroup > radio:hover {
background-color: var(--in-content-button-background-hover) !important; /* #E0E8F6; */
}
Expand Down Expand Up @@ -2439,7 +2443,11 @@
#placesToolbar > toolbarbutton {
appearance: none !important;
padding: 5px !important;
border-radius: 4px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_button") {
#placesToolbar > toolbarbutton {
border-radius: 4px !important;
}
}
#placesToolbar > toolbarbutton[disabled] {
opacity: 0.6 !important;
Expand All @@ -2463,11 +2471,15 @@
#placesMenu > menu {
appearance: none !important;
color: var(--organizer-color) !important;
border-radius: 4px !important;
padding-block: 5px !important;
padding-inline-start: 5px !important;
margin-inline-end: 2px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_button") {
#placesMenu > menu {
border-radius: 4px !important;
}
}
#placesMenu > menu[_moz-menuactive="true"],
#placesMenu > menu:hover {
background-color: var(--organizer-hover-background) !important;
Expand All @@ -2489,11 +2501,16 @@
background-color: var(--organizer-toolbar-field-background) !important;
color: var(--organizer-color) !important;
border: 1px solid var(--organizer-toolbar-field-border-color) !important;
border-radius: 4px !important;
margin: 0 !important;
padding-block: 2px !important;
min-height: 24px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_field") {
#searchFilter,
#detailsPane html|input {
border-radius: 4px !important;
}
}
#searchFilter[focused] {
box-shadow: var(--organizer-toolbar-field-focus-box-shadow) !important;
background-color: var(--organizer-toolbar-field-background-focused) !important;
Expand Down Expand Up @@ -2629,12 +2646,17 @@
margin: 0 !important;
margin-inline-end: 4px !important;
border: 1px solid var(--organizer-pane-field-border-color) !important;
border-radius: 4px !important;
color: var(--organizer-color) !important;
background-color: var(--organizer-content-background) !important;
-moz-context-properties: fill !important;
fill: currentColor !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_button") {
#editBookmarkPanelRows .expander-up,
#editBookmarkPanelRows .expander-down {
border-radius: 4px !important;
}
}
#editBookmarkPanelRows .expander-up:hover,
#editBookmarkPanelRows .expander-down:hover {
background-color: var(--organizer-hover-background) !important;
Expand Down Expand Up @@ -2662,12 +2684,16 @@
}
#places input {
border: 1px solid var(--organizer-pane-field-border-color) !important;
border-radius: 4px !important;
background-color: var(--organizer-content-background) !important;
color: var(--organizer-color) !important;
min-height: 20px !important;
padding-inline: 4px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_field") {
#places input {
border-radius: 4px !important;
}
}
#places input:focus {
outline: 2px solid var(--organizer-outline-color) !important;
outline-offset: -1px !important;
Expand All @@ -2684,7 +2710,11 @@
color: var(--organizer-color) !important;
background-color: var(--organizer-content-background) !important;
border: 1px solid var(--organizer-border-color) !important;
border-radius: 4px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_field") {
#editBMPanel_tagsSelectorRow > richlistbox {
border-radius: 4px !important;
}
}
#editBMPanel_tagsSelectorRow > richlistbox > richlistitem {
border: 1px solid transparent !important;
Expand Down Expand Up @@ -3100,7 +3130,7 @@
}
}
@supports -moz-bool-pref("userChrome.rounding.square_menupopup") {
xul|menupopup {
xul|menulist > xul|menupopup {
--panel-border-radius: 0px !important;
border-radius: 0 !important;
}
Expand All @@ -3116,6 +3146,7 @@
html|select[size][multiple],
xul|listheader,
xul|richlistbox,
xul|menulist,
html|input {
border-radius: 0 !important;
}
Expand Down
52 changes: 41 additions & 11 deletions css/leptonContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,11 @@
#placesToolbar > toolbarbutton {
appearance: none !important;
padding: 5px !important;
border-radius: 4px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_button") {
#placesToolbar > toolbarbutton {
border-radius: 4px !important;
}
}
#placesToolbar > toolbarbutton[disabled] {
opacity: 0.6 !important;
Expand All @@ -2268,11 +2272,15 @@
#placesMenu > menu {
appearance: none !important;
color: var(--organizer-color) !important;
border-radius: 4px !important;
padding-block: 5px !important;
padding-inline-start: 5px !important;
margin-inline-end: 2px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_button") {
#placesMenu > menu {
border-radius: 4px !important;
}
}
#placesMenu > menu[_moz-menuactive="true"],
#placesMenu > menu:hover {
background-color: var(--organizer-hover-background) !important;
Expand All @@ -2294,11 +2302,16 @@
background-color: var(--organizer-toolbar-field-background) !important;
color: var(--organizer-color) !important;
border: 1px solid var(--organizer-toolbar-field-border-color) !important;
border-radius: 4px !important;
margin: 0 !important;
padding-block: 2px !important;
min-height: 24px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_field") {
#searchFilter,
#detailsPane html|input {
border-radius: 4px !important;
}
}
#searchFilter[focused] {
box-shadow: var(--organizer-toolbar-field-focus-box-shadow) !important;
background-color: var(--organizer-toolbar-field-background-focused) !important;
Expand Down Expand Up @@ -2434,12 +2447,17 @@
margin: 0 !important;
margin-inline-end: 4px !important;
border: 1px solid var(--organizer-pane-field-border-color) !important;
border-radius: 4px !important;
color: var(--organizer-color) !important;
background-color: var(--organizer-content-background) !important;
-moz-context-properties: fill !important;
fill: currentColor !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_button") {
#editBookmarkPanelRows .expander-up,
#editBookmarkPanelRows .expander-down {
border-radius: 4px !important;
}
}
#editBookmarkPanelRows .expander-up:hover,
#editBookmarkPanelRows .expander-down:hover {
background-color: var(--organizer-hover-background) !important;
Expand Down Expand Up @@ -2467,12 +2485,16 @@
}
#places input {
border: 1px solid var(--organizer-pane-field-border-color) !important;
border-radius: 4px !important;
background-color: var(--organizer-content-background) !important;
color: var(--organizer-color) !important;
min-height: 20px !important;
padding-inline: 4px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_field") {
#places input {
border-radius: 4px !important;
}
}
#places input:focus {
outline: 2px solid var(--organizer-outline-color) !important;
outline-offset: -1px !important;
Expand All @@ -2489,7 +2511,11 @@
color: var(--organizer-color) !important;
background-color: var(--organizer-content-background) !important;
border: 1px solid var(--organizer-border-color) !important;
border-radius: 4px !important;
}
@supports not -moz-bool-pref("userChrome.rounding.square_field") {
#editBMPanel_tagsSelectorRow > richlistbox {
border-radius: 4px !important;
}
}
#editBMPanel_tagsSelectorRow > richlistbox > richlistitem {
border: 1px solid transparent !important;
Expand Down Expand Up @@ -2726,7 +2752,8 @@
}
/** Rounding ******************************************************************/
@supports -moz-bool-pref("userChrome.rounding.square_button") {
@-moz-document url-prefix("about:") {
@-moz-document url-prefix("about:"), url-prefix("chrome://browser/content/preferences/dialogs")
{
button,
.close-icon,
.action-icon::before,
Expand Down Expand Up @@ -2771,15 +2798,17 @@
}
}
@supports -moz-bool-pref("userChrome.rounding.square_checklabel") {
@-moz-document url-prefix("about:") {
@-moz-document url-prefix("about:"), url-prefix("chrome://browser/content/preferences/dialogs")
{
input[type="checkbox"]:not(.toggle-button),
.checkbox-check {
border-radius: 0 !important;
}
}
}
@supports -moz-bool-pref("userChrome.rounding.square_field") {
@-moz-document url-prefix("about:") {
@-moz-document url-prefix("about:"), url-prefix("chrome://browser/content/preferences/dialogs")
{
input:is([type="email"], [type="tel"], [type="text"], [type="password"], [type="url"], [type="number"]),
textarea,
select,
Expand All @@ -2801,8 +2830,9 @@
}
}
@supports -moz-bool-pref("userChrome.rounding.square_menupopup") {
@-moz-document url-prefix("about:preferences") {
menupopup {
@-moz-document url-prefix("about:preferences"), url-prefix("chrome://browser/content/preferences/dialogs")
{
xul|menulist > xul|menupopup {
--panel-border-radius: 0 !important;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/contents/_rounding.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@include Option("userChrome.rounding.square_button") {
@include moz-document(url-prefix "about:") {
@include moz-document(url-prefix "about:", url-prefix "chrome://browser/content/preferences/dialogs") {
button,
.close-icon,
.action-icon::before,
Expand Down Expand Up @@ -49,7 +49,7 @@
}

@include Option("userChrome.rounding.square_checklabel") {
@include moz-document(url-prefix "about:") {
@include moz-document(url-prefix "about:", url-prefix "chrome://browser/content/preferences/dialogs") {
input[type="checkbox"]:not(.toggle-button),
.checkbox-check {
border-radius: 0 !important;
Expand All @@ -58,7 +58,7 @@
}

@include Option("userChrome.rounding.square_field") {
@include moz-document(url-prefix "about:") {
@include moz-document(url-prefix "about:", url-prefix "chrome://browser/content/preferences/dialogs") {
input:is([type="email"], [type="tel"], [type="text"], [type="password"], [type="url"], [type="number"]),
textarea,
select,
Expand All @@ -85,8 +85,8 @@
}

@include Option("userChrome.rounding.square_menupopup") {
@include moz-document(url-prefix "about:preferences") {
menupopup {
@include moz-document(url-prefix "about:preferences", url-prefix "chrome://browser/content/preferences/dialogs") {
xul|menulist > xul|menupopup {
--panel-border-radius: 0 !important;
}
}
Expand Down
30 changes: 24 additions & 6 deletions src/library/_proton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@
> toolbarbutton {
appearance: none !important;
padding: 5px !important;
border-radius: 4px !important;

@include NotOption("userChrome.rounding.square_button") {
border-radius: 4px !important;
}

&[disabled] {
opacity: 0.6 !important;
Expand Down Expand Up @@ -108,11 +111,14 @@
> menu {
appearance: none !important;
color: var(--organizer-color) !important;
border-radius: 4px !important;
padding-block: 5px !important;
padding-inline-start: 5px !important;
margin-inline-end: 2px !important;

@include NotOption("userChrome.rounding.square_button") {
border-radius: 4px !important;
}

&[_moz-menuactive="true"],
&:hover {
background-color: var(--organizer-hover-background) !important;
Expand All @@ -137,10 +143,13 @@
background-color: var(--organizer-toolbar-field-background) !important;
color: var(--organizer-color) !important;
border: 1px solid var(--organizer-toolbar-field-border-color) !important;
border-radius: 4px !important;
margin: 0 !important;
padding-block: 2px !important;
min-height: 24px !important;

@include NotOption("userChrome.rounding.square_field") {
border-radius: 4px !important;
}
}

#searchFilter[focused] {
Expand Down Expand Up @@ -298,12 +307,15 @@ treechildren {
margin: 0 !important;
margin-inline-end: 4px !important;
border: 1px solid var(--organizer-pane-field-border-color) !important;
border-radius: 4px !important;
color: var(--organizer-color) !important;
background-color: var(--organizer-content-background) !important;
-moz-context-properties: fill !important;
fill: currentColor !important;

@include NotOption("userChrome.rounding.square_button") {
border-radius: 4px !important;
}

&:hover {
background-color: var(--organizer-hover-background) !important;
color: var(--organizer-hover-color) !important;
Expand Down Expand Up @@ -334,12 +346,15 @@ treechildren {

#places input {
border: 1px solid var(--organizer-pane-field-border-color) !important;
border-radius: 4px !important;
background-color: var(--organizer-content-background) !important;
color: var(--organizer-color) !important;
min-height: 20px !important;
padding-inline: 4px !important;

@include NotOption("userChrome.rounding.square_field") {
border-radius: 4px !important;
}

&:focus {
outline: 2px solid var(--organizer-outline-color) !important;
outline-offset: -1px !important;
Expand All @@ -359,7 +374,10 @@ treechildren {
color: var(--organizer-color) !important;
background-color: var(--organizer-content-background) !important;
border: 1px solid var(--organizer-border-color) !important;
border-radius: 4px !important;

@include NotOption("userChrome.rounding.square_field") {
border-radius: 4px !important;
}

> richlistitem {
border: 1px solid transparent !important;
Expand Down
Loading