Skip to content

Commit

Permalink
feat(ci): format LESS files using official prettier
Browse files Browse the repository at this point in the history
fix #2611 (comment)

prettier PR: prettier/prettier#14208
  • Loading branch information
mvorisek committed Apr 10, 2023
1 parent 344657e commit 721a6c3
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
run: npm run lint
- name: Assert LESS files formatting using Prettier
run: >
yarn add -D github:fomantic/prettier#2.8.3-patched
yarn add -D github:prettier/prettier#c6e026ea28
&& npx prettier --loglevel warn '!dist' '!test/coverage' '!src/semantic.less' '**/*.{css,less,overrides,variables}' --write
&& git restore package.json yarn.lock
&& git add . -N && git diff --color --exit-code
Expand Down
6 changes: 5 additions & 1 deletion src/themes/amazon/elements/button.variables
Expand Up @@ -3,7 +3,11 @@
-------------------- */

/* Button Variables */
@pageFont: Helvetica Neue, Helvetica, Arial, sans-serif;
@pageFont:
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
@textTransform: none;
@textColor: #111;
@fontWeight: normal;
Expand Down
6 changes: 5 additions & 1 deletion src/themes/bootstrap3/elements/button.variables
Expand Up @@ -3,7 +3,11 @@
-------------------- */

/* Button Variables */
@pageFont: Helvetica Neue, Helvetica, Arial, sans-serif;
@pageFont:
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
@textTransform: none;
@fontWeight: @normal;
@textColor: rgba(51, 51, 51, 1);
Expand Down
7 changes: 6 additions & 1 deletion src/themes/chubby/elements/header.variables
Expand Up @@ -2,7 +2,12 @@
Header
-------------------- */

@headerFont: "Source Sans Pro", Helvetica Neue, Helvetica, Arial, sans-serif;
@headerFont:
"Source Sans Pro",
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
@fontWeight: bold;
@textTransform: none;

Expand Down
12 changes: 3 additions & 9 deletions src/themes/default/collections/message.variables
Expand Up @@ -19,9 +19,7 @@
@borderWidth: 1px;
@borderShadow: 0 0 0 @borderWidth @strongBorderColor inset;
@shadowShadow: 0 0 0 0 rgba(0, 0, 0, 0);
@boxShadow:
@borderShadow,
@shadowShadow;
@boxShadow: @borderShadow, @shadowShadow;

@transition:
opacity @defaultDuration @defaultEasing,
Expand Down Expand Up @@ -71,14 +69,10 @@
@attachedXOffset: -1px;
@attachedYOffset: -1px;
@attachedBoxShadow: 0 0 0 @borderWidth @borderColor inset;
@attachedBottomBoxShadow:
@attachedBoxShadow,
@subtleShadow;
@attachedBottomBoxShadow: @attachedBoxShadow, @subtleShadow;

/* Floating */
@floatingBoxShadow:
@borderShadow,
@floatingShadow;
@floatingBoxShadow: @borderShadow, @floatingShadow;

/* Colors */
@redBoxShadow:
Expand Down
4 changes: 1 addition & 3 deletions src/themes/default/elements/button.variables
Expand Up @@ -38,9 +38,7 @@
@borderBoxShadowColor: transparent;
@borderBoxShadowWidth: 1px;
@borderBoxShadow: 0 0 0 @borderBoxShadowWidth @borderBoxShadowColor inset;
@boxShadow:
@borderBoxShadow,
@shadowBoxShadow;
@boxShadow: @borderBoxShadow, @shadowBoxShadow;

/* Icon */
@iconHeight: auto;
Expand Down
18 changes: 17 additions & 1 deletion src/themes/default/globals/site.variables
Expand Up @@ -14,7 +14,23 @@
@fontFileNameSupplement: "Lato";

// based on https://github.com/twbs/bootstrap/blob/v5.1.3/scss/_variables.scss#L577 list
@fallbackFonts: system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
@fallbackFonts:
system-ui,
-apple-system,
"Segoe UI",
Roboto,
Oxygen,
Ubuntu,
Cantarell,
"Helvetica Neue",
Arial,
"Noto Sans",
"Liberation Sans",
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";

@headerFont: @fontName, @fallbackFonts;
@pageFont: @fontName, @fallbackFonts;
Expand Down
16 changes: 4 additions & 12 deletions src/themes/default/views/card.variables
Expand Up @@ -21,9 +21,7 @@
@width: 290px;
@borderWidth: 1px;
@borderShadow: 0 0 0 @borderWidth @solidBorderColor;
@boxShadow:
@shadowBoxShadow,
@borderShadow;
@boxShadow: @shadowBoxShadow, @borderShadow;
@border: none;
@zIndex: "";
@transition:
Expand Down Expand Up @@ -164,22 +162,16 @@
@linkHoverTransform: translateY(-@linkHoverRaiseDistance);

@shadowHoverBoxShadow: 0 @shadowDistance @linkHoverRaiseDistance 0 @solidSelectedBorderColor;
@linkHoverBoxShadow:
@shadowHoverBoxShadow,
@borderShadow;
@linkHoverBoxShadow: @shadowHoverBoxShadow, @borderShadow;

/* Horizontal */
@horizontalMinWidth: 270px;
@horizontalWidth: 400px;
@horizontalImageWidth: 150px;

/* Raised */
@raisedShadow:
@borderShadow,
@floatingShadow;
@raisedShadowHover:
@borderShadow,
@floatingShadowHover;
@raisedShadow: @borderShadow, @floatingShadow;
@raisedShadowHover: @borderShadow, @floatingShadowHover;

/* Basic Raised */
@basicRaisedShadow: @floatingShadow;
Expand Down
6 changes: 5 additions & 1 deletion src/themes/github/elements/button.variables
Expand Up @@ -3,7 +3,11 @@
-------------------- */

/* Button Variables */
@pageFont: Helvetica Neue, Helvetica, Arial, sans-serif;
@pageFont:
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
@textTransform: none;
@fontWeight: bold;
@textColor: #333;
Expand Down
6 changes: 5 additions & 1 deletion src/themes/twitter/elements/button.variables
Expand Up @@ -2,7 +2,11 @@
Global Variables
-------------------- */

@pageFont: Helvetica Neue, Helvetica, Arial, sans-serif;
@pageFont:
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
@textColor: #66757f;
@blue: #55acee;

Expand Down

0 comments on commit 721a6c3

Please sign in to comment.