From dc8d01cd74118fe394f825dbc1b5850fc2d0e6e2 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Wed, 7 Feb 2024 07:13:01 -0700 Subject: [PATCH] Add `*.css` files to prettier scripts and apply the script to the current css files GitOrigin-RevId: 6ee4e9d7ada9d4e6084215c78f919c83f3f60642 --- services/web/frontend/fonts/dm-mono.css | 12 ++-- services/web/frontend/fonts/lato.css | 8 +-- services/web/frontend/fonts/noto-sans.css | 36 +++++------ services/web/frontend/fonts/stix-two-math.css | 5 +- .../stylesheets/vendor/select/select.css | 62 +++++++++++-------- services/web/package.json | 4 +- 6 files changed, 69 insertions(+), 58 deletions(-) diff --git a/services/web/frontend/fonts/dm-mono.css b/services/web/frontend/fonts/dm-mono.css index c1dfeee9f0..bc4a6b8356 100644 --- a/services/web/frontend/fonts/dm-mono.css +++ b/services/web/frontend/fonts/dm-mono.css @@ -9,7 +9,7 @@ font-feature-settings: 'ss05'; font-style: normal; font-weight: 300; - src: url('dm-mono/DMMono-Light.woff2') format('woff2'), + src: url('dm-mono/DMMono-Light.woff2') format('woff2'); } @font-face { @@ -17,7 +17,7 @@ font-feature-settings: 'ss05'; font-style: italic; font-weight: 300; - src: url('dm-mono/DMMono-LightItalic.woff2') format('woff2'), + src: url('dm-mono/DMMono-LightItalic.woff2') format('woff2'); } @font-face { @@ -25,7 +25,7 @@ font-feature-settings: 'ss05'; font-style: normal; font-weight: 400; - src: url('dm-mono/DMMono-Regular.woff2') format('woff2'), + src: url('dm-mono/DMMono-Regular.woff2') format('woff2'); } @font-face { @@ -33,7 +33,7 @@ font-feature-settings: 'ss05'; font-style: italic; font-weight: 400; - src: url('dm-mono/DMMono-Italic.woff2') format('woff2'), + src: url('dm-mono/DMMono-Italic.woff2') format('woff2'); } @font-face { @@ -41,7 +41,7 @@ font-feature-settings: 'ss05'; font-style: normal; font-weight: 500; - src: url('dm-mono/DMMono-Medium.woff2') format('woff2'), + src: url('dm-mono/DMMono-Medium.woff2') format('woff2'); } @font-face { @@ -49,5 +49,5 @@ font-feature-settings: 'ss05'; font-style: italic; font-weight: 500; - src: url('dm-mono/DMMono-MediumItalic.woff2') format('woff2'), + src: url('dm-mono/DMMono-MediumItalic.woff2') format('woff2'); } diff --git a/services/web/frontend/fonts/lato.css b/services/web/frontend/fonts/lato.css index 53b2c69356..2d616c9206 100644 --- a/services/web/frontend/fonts/lato.css +++ b/services/web/frontend/fonts/lato.css @@ -3,7 +3,7 @@ font-style: normal; font-weight: 400; src: url('lato/lato-v2-latin-ext-regular.woff2') format('woff2'), - url('lato/lato-v2-latin-ext-regular.woff') format('woff'); + url('lato/lato-v2-latin-ext-regular.woff') format('woff'); } @font-face { @@ -11,7 +11,7 @@ font-style: italic; font-weight: 400; src: url('lato/lato-v2-latin-ext-italic.woff2') format('woff2'), - url('lato/lato-v2-latin-ext-italic.woff') format('woff'); + url('lato/lato-v2-latin-ext-italic.woff') format('woff'); } @font-face { @@ -19,7 +19,7 @@ font-style: normal; font-weight: 700; src: url('lato/lato-v2-latin-ext-700.woff2') format('woff2'), - url('lato/lato-v2-latin-ext-700.woff') format('woff'); + url('lato/lato-v2-latin-ext-700.woff') format('woff'); } @font-face { @@ -27,5 +27,5 @@ font-style: italic; font-weight: 700; src: url('lato/lato-v2-latin-ext-700italic.woff2') format('woff2'), - url('lato/lato-v2-latin-ext-700italic.woff') format('woff'); + url('lato/lato-v2-latin-ext-700italic.woff') format('woff'); } diff --git a/services/web/frontend/fonts/noto-sans.css b/services/web/frontend/fonts/noto-sans.css index dab5ad34c4..db6f80d2ef 100644 --- a/services/web/frontend/fonts/noto-sans.css +++ b/services/web/frontend/fonts/noto-sans.css @@ -3,14 +3,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 100; - src: url('noto-sans/NotoSans-Thin.woff2') format('woff2'), + src: url('noto-sans/NotoSans-Thin.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 100; - src: url('noto-sans/NotoSans-ThinItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-ThinItalic.woff2') format('woff2'); } /* Noto Sans - ExtraLight */ @@ -18,14 +18,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 200; - src: url('noto-sans/NotoSans-ExtraLight.woff2') format('woff2'), + src: url('noto-sans/NotoSans-ExtraLight.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 200; - src: url('noto-sans/NotoSans-ExtraLightItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-ExtraLightItalic.woff2') format('woff2'); } /* Noto Sans - Light */ @@ -33,14 +33,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 300; - src: url('noto-sans/NotoSans-Light.woff2') format('woff2'), + src: url('noto-sans/NotoSans-Light.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 300; - src: url('noto-sans/NotoSans-LightItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-LightItalic.woff2') format('woff2'); } /* Noto Sans - Regular */ @@ -48,14 +48,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 400; - src: url('noto-sans/NotoSans-Regular.woff2') format('woff2'), + src: url('noto-sans/NotoSans-Regular.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 400; - src: url('noto-sans/NotoSans-Italic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-Italic.woff2') format('woff2'); } /* Noto Sans - Medium */ @@ -63,14 +63,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 500; - src: url('noto-sans/NotoSans-Medium.woff2') format('woff2'), + src: url('noto-sans/NotoSans-Medium.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 500; - src: url('noto-sans/NotoSans-MediumItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-MediumItalic.woff2') format('woff2'); } /* Noto Sans - SemiBold */ @@ -78,14 +78,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 600; - src: url('noto-sans/NotoSans-SemiBold.woff2') format('woff2'), + src: url('noto-sans/NotoSans-SemiBold.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 600; - src: url('noto-sans/NotoSans-SemiBoldItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-SemiBoldItalic.woff2') format('woff2'); } /* Noto Sans - Bold */ @@ -93,14 +93,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 700; - src: url('noto-sans/NotoSans-Bold.woff2') format('woff2'), + src: url('noto-sans/NotoSans-Bold.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 700; - src: url('noto-sans/NotoSans-BoldItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-BoldItalic.woff2') format('woff2'); } /* Noto Sans - ExtraBold */ @@ -108,14 +108,14 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 800; - src: url('noto-sans/NotoSans-ExtraBold.woff2') format('woff2'), + src: url('noto-sans/NotoSans-ExtraBold.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 800; - src: url('noto-sans/NotoSans-ExtraBoldItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-ExtraBoldItalic.woff2') format('woff2'); } /* Noto Sans - Black */ @@ -123,12 +123,12 @@ font-family: 'Noto Sans'; font-style: normal; font-weight: 900; - src: url('noto-sans/NotoSans-Black.woff2') format('woff2'), + src: url('noto-sans/NotoSans-Black.woff2') format('woff2'); } @font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 900; - src: url('noto-sans/NotoSans-BlackItalic.woff2') format('woff2'), + src: url('noto-sans/NotoSans-BlackItalic.woff2') format('woff2'); } diff --git a/services/web/frontend/fonts/stix-two-math.css b/services/web/frontend/fonts/stix-two-math.css index 4fd5d2840c..13528348aa 100644 --- a/services/web/frontend/fonts/stix-two-math.css +++ b/services/web/frontend/fonts/stix-two-math.css @@ -1,5 +1,4 @@ @font-face { - font-family: "Stix Two Math"; - src: url("./STIXTwoMath/STIXTwoMath-Regular.woff2") - format("woff2"); + font-family: 'Stix Two Math'; + src: url('./STIXTwoMath/STIXTwoMath-Regular.woff2') format('woff2'); } diff --git a/services/web/frontend/stylesheets/vendor/select/select.css b/services/web/frontend/stylesheets/vendor/select/select.css index 8813f52b68..60e1675b94 100755 --- a/services/web/frontend/stylesheets/vendor/select/select.css +++ b/services/web/frontend/stylesheets/vendor/select/select.css @@ -5,7 +5,6 @@ * License: MIT */ - /* Style when highlighting a search. */ .ui-select-highlight { font-weight: bold; @@ -25,7 +24,6 @@ top: 0px !important; } - .ui-select-choices-row:hover, .ui-select-choices-row--highlighted { background-color: #f5f5f5; @@ -35,7 +33,7 @@ /* Mark invalid Select2 */ .ng-dirty.ng-invalid > a.select2-choice { - border-color: #D44950; + border-color: #d44950; } .select2-result-single { @@ -55,14 +53,14 @@ body > .select2-container.open { } /* Handle up direction Select2 */ -.ui-select-container[theme="select2"].direction-up .ui-select-match, +.ui-select-container[theme='select2'].direction-up .ui-select-match, .ui-select-container.select2.direction-up .ui-select-match { border-radius: 4px; /* FIXME hardcoded value :-/ */ border-top-left-radius: 0; border-top-right-radius: 0; } -.ui-select-container[theme="select2"].direction-up .ui-select-dropdown, +.ui-select-container[theme='select2'].direction-up .ui-select-dropdown, .ui-select-container.select2.direction-up .ui-select-dropdown { border-radius: 4px; /* FIXME hardcoded value :-/ */ border-bottom-left-radius: 0; @@ -76,18 +74,27 @@ body > .select2-container.open { margin-top: -4px; /* FIXME hardcoded value :-/ */ } -.ui-select-container[theme="select2"].direction-up .ui-select-dropdown .select2-search, +.ui-select-container[theme='select2'].direction-up + .ui-select-dropdown + .select2-search, .ui-select-container.select2.direction-up .ui-select-dropdown .select2-search { margin-top: 4px; /* FIXME hardcoded value :-/ */ } -.ui-select-container[theme="select2"].direction-up.select2-dropdown-open .ui-select-match, -.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match { +.ui-select-container[theme='select2'].direction-up.select2-dropdown-open + .ui-select-match, +.ui-select-container.select2.direction-up.select2-dropdown-open + .ui-select-match { border-bottom-color: #5897fb; } -.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden, -.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden input { +.ui-select-container[theme='select2'] + .ui-select-dropdown + .ui-select-search-hidden, +.ui-select-container[theme='select2'] + .ui-select-dropdown + .ui-select-search-hidden + input { opacity: 0; height: 0; min-height: 0; @@ -100,7 +107,7 @@ body > .select2-container.open { /* Helper class to show styles when focus */ .selectize-input.selectize-focus { - border-color: #007FBB !important; + border-color: #007fbb !important; } /* Fix input width for Selectize theme */ @@ -120,16 +127,16 @@ body > .select2-container.open { /* Mark invalid Selectize */ .ng-dirty.ng-invalid > div.selectize-input { - border-color: #D44950; + border-color: #d44950; } /* Handle up direction Selectize */ -.ui-select-container[theme="selectize"].direction-up .ui-select-dropdown { +.ui-select-container[theme='selectize'].direction-up .ui-select-dropdown { box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); margin-top: -2px; /* FIXME hardcoded value :-/ */ } -.ui-select-container[theme="selectize"] input.ui-select-search-hidden { +.ui-select-container[theme='selectize'] input.ui-select-search-hidden { opacity: 0; height: 0; min-height: 0; @@ -144,12 +151,13 @@ body > .select2-container.open { /* Helper class to show styles when focus */ .btn-default-focus { color: #333; - background-color: #EBEBEB; - border-color: #ADADAD; + background-color: #ebebeb; + border-color: #adadad; text-decoration: none; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 8px rgba(102, 175, 233, 0.6); } .ui-select-bootstrap .ui-select-toggle { @@ -176,7 +184,9 @@ body > .select2-container.open { border-bottom-right-radius: 0; } -.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up { +.input-group + > .ui-select-bootstrap + > input.ui-select-search.form-control.direction-up { border-radius: 4px !important; /* FIXME hardcoded value :-/ */ border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; @@ -203,7 +213,8 @@ body > .select2-container.open { } /* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */ -.ui-select-bootstrap > .ui-select-choices, .ui-select-bootstrap > .ui-select-no-choice { +.ui-select-bootstrap > .ui-select-choices, +.ui-select-bootstrap > .ui-select-no-choice { width: 100%; height: auto; max-height: 200px; @@ -247,7 +258,7 @@ body > .ui-select-bootstrap.open { } .ui-select-multiple:hover .ui-select-match-item.dropping-before:before { - content: ""; + content: ''; position: absolute; top: 0; right: 100%; @@ -257,7 +268,7 @@ body > .ui-select-bootstrap.open { } .ui-select-multiple:hover .ui-select-match-item.dropping-after:after { - content: ""; + content: ''; position: absolute; top: 0; left: 100%; @@ -279,10 +290,11 @@ body > .ui-select-bootstrap.open { .ui-select-title { padding: 3px 20px; - font-size: 14px ; + font-size: 14px; } -.ui-select-bootstrap .ui-select-choices-row > span:hover, .ui-select-bootstrap .ui-select-choices-row > span:focus { +.ui-select-bootstrap .ui-select-choices-row > span:hover, +.ui-select-bootstrap .ui-select-choices-row > span:focus { text-decoration: none; color: #262626; background-color: #f5f5f5; @@ -310,11 +322,11 @@ body > .ui-select-bootstrap.open { /* Mark invalid Bootstrap */ .ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match { - border-color: #D44950; + border-color: #d44950; } /* Handle up direction Bootstrap */ -.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown { +.ui-select-container[theme='bootstrap'].direction-up .ui-select-dropdown { box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); } diff --git a/services/web/package.json b/services/web/package.json index 5260277a2f..38dff5f95d 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -22,8 +22,8 @@ "webpack:profile": "webpack --config webpack.config.prod.js --profile --json > stats.json", "format": "prettier --list-different $PWD/'**/*.{js,jsx,mjs,ts,tsx,json}'", "format:fix": "prettier --write $PWD/'**/*.{js,jsx,mjs,ts,tsx,json}'", - "format:styles": "prettier --list-different $PWD/'**/*.less'", - "format:styles:fix": "prettier --write $PWD/'**/*.less'", + "format:styles": "prettier --list-different $PWD/'**/*.{css,less}'", + "format:styles:fix": "prettier --write $PWD/'**/*.{css,less}'", "lint": "eslint --max-warnings 0 --format unix --ext .js,.jsx,.mjs,.ts,.tsx .", "lint:fix": "eslint --fix --ext .js,.jsx,.mjs,.ts,.tsx .", "type-check": "tsc --noEmit",