Skip to content
Draft
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
18 changes: 10 additions & 8 deletions .qlty/configs/.stylelintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
extends: stylelint-config-standard-scss

rules:
scss/at-extend-no-missing-placeholder: false
scss/dollar-variable-pattern: false
scss/at-function-pattern: false # TODO: we should standardize function names
# scss/at-extend-no-missing-placeholder: false
# scss/dollar-variable-pattern: false
# scss/at-function-pattern: false # TODO: we should standardize function names

alpha-value-notation: number # TODO: Sass is too old, this should be percentage

color-function-alias-notation: false # TODO: make it 'without-alpha'
# color-function-alias-notation: false # TODO: make it 'without-alpha'
color-function-notation: legacy # TODO: make it 'modern'

custom-property-pattern:
Expand All @@ -25,12 +25,14 @@ rules:
- always-multi-line
- except:
- first-nested
- after-first-line-comment
- after-single-line-comment
- ignore:
- after-comment

selector-class-pattern: false # TODO: we should standardize class names
selector-class-pattern: null # TODO: we should standardize class names

selector-id-pattern: false # TODO: we should standardize id names
# selector-id-pattern: false # TODO: we should standardize id names

value-keyword-case: lower
value-keyword-case:
- lower
- camelCaseSvgKeywords: true
6 changes: 4 additions & 2 deletions .qlty/qlty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,7 @@ package_filters = ["eslint"]

[[plugin]]
name = "stylelint"
package_file = "package.json"
package_filters = ["stylelint"]
# package_file = "package.json"
# package_filters = ["stylelint"]
version = "15.11.0"
extra_packages = ["stylelint-config-standard-scss@latest"]
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
app/assets/stylesheets/vendor/**/*.scss
7 changes: 3 additions & 4 deletions app/assets/stylesheets/error.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@use 'provider/colors' as *;
@use 'provider/logo';
@use 'provider/typography' as *;
@use "provider/typography" as *;

$width: line-height-times(24);
$wrapper-padding: line-height-times(1);
$border-color: #d2d2d2;

html {
@include typography-base;
Expand Down Expand Up @@ -51,7 +50,7 @@ body {
/* stylelint-disable-next-line no-descending-specificity -- FIXME */
a {
text-decoration: none;
color: $label-color;
color: #8A8D90;
}
}

Expand Down
92 changes: 37 additions & 55 deletions app/assets/stylesheets/provider/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,71 +1,53 @@
@use "provider/colors" as *;
@use "provider/typography" as *;
@use 'sass:math';
@use "sass:math";

@mixin internal-potato-button($color, $bgcolor, $border-color) {
font-size: $font-size-base;
background-color: $bgcolor;
border-radius: $border-radius-sm;
display: inline-block;
vertical-align: top;
margin: 0;
padding: line-height-times(math.div(1,3)) line-height-times(.5) !important;
border: $border-width solid $border-color;
color: $color;
text-decoration: none;
width: auto !important;
min-width: line-height-times(3);
cursor: pointer;
white-space: nowrap;
text-align: center !important;
height: line-height-times(1.5);
line-height: $line-height-sm;
appearance: none;

&.big {
font-size: $font-size-lg;
.button,
a {
&.next {
float: right;
}

&:hover {
color: $bgcolor;
background-color: transparent;
}

}

table [type='submit']:not(.action, .pf-c-button, .pf-c-dropdown__menu-item) {
float: right;

@include internal-potato-button($important-button-color, $important-button-bg-color, $important-button-border-color);
}

table .disabled-button,
/* stylelint-disable-next-line no-descending-specificity -- FIXME */
.disabled-button {
@include internal-potato-button($disabled-button-color, $disabled-button-bg-color, $disabled-button-border-color);

cursor: default;
}

.button.next,
a.next {
float: right;
}
// TODO: remove this class
.button-bar {
position: relative;

.confirm-or-cancel {
.button.next,
a.next {
clear: none;
fieldset {
margin: 0;
}

.button.cancel,
a.cancel {
float: left;
margin-top: line-height-times(2);
& > fieldset {
& > ol > li {
display: inline-block;
}

&.actions:first-child {
float: left;
margin: line-height-times(.5) 0 0;
padding: 0;
text-align: left !important;

& > ol > li {
margin-right: var(--pf-global--spacer--sm);
}
}

&.actions:last-child:not(:first-child) {
float: right;
margin: line-height-times(.5) 0 0;
padding: 0;

& > ol > li {
margin-left: var(--pf-global--spacer--sm);
}
}
}

display: flow-root;
}

// TODO: remove outline-button
@mixin outline-button($color: $font-color, $border-color: $border-color) {
color: $color;
display: inline-block;
Expand Down
27 changes: 0 additions & 27 deletions app/assets/stylesheets/provider/_call_to_action.scss

This file was deleted.

13 changes: 10 additions & 3 deletions app/assets/stylesheets/provider/_colorbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@use 'provider/links' as *;
@use 'sass:math';

/* stylelint-disable selector-id-pattern */
#colorbox,
#cboxOverlay,
#cboxWrapper {
Expand All @@ -17,11 +18,16 @@

#cboxWrapper {
max-width: none;

h2 {
font-weight: $font-weight-bold;
font-size: $secondary-title-font-size;
}
}

#colorbox {
box-shadow: 0 0 line-height-times(.5) $box-shadow-color;
background: rgba($body-background, .99);
box-shadow: var(--pf-global--BoxShadow--lg);
background: white;
border: $border-width solid $border-color;
text-align: left;
border-radius: $border-radius;
Expand Down Expand Up @@ -59,7 +65,7 @@
position: fixed;
width: 100%;
height: 100%;
background: rgba($content-background, .8);
background: var(--pf-global--BackgroundColor--dark-transparent-100);
}

#cboxMiddleLeft,
Expand Down Expand Up @@ -129,3 +135,4 @@
}
}
}
/* stylelint-enable selector-id-pattern */
139 changes: 12 additions & 127 deletions app/assets/stylesheets/provider/_colors.scss
Original file line number Diff line number Diff line change
@@ -1,130 +1,15 @@
@charset 'utf-8';

// Descriptive color names
// based on color names with main color attached for clarity if needed http://chir.ag/projects/name-that-color/

/* TODO: can we use actual PF vars? */
// greys
$alabasterWhite: #fafafa; // pf-black-100
$altoGray: #d2d2d2; // pf-black-300
$black: #030303; // pf-black
$osloGray: #8a8d90; // pf-black-500
$outerSpaceGray: #3c3f42; // pf-black-800
$gallery: #f0f0f0; // pf-black-200
$white: #fff;
$whiteBoxShadowColor: rgba(3, 3, 3, 0.2);
$whiteBoxShadow: $whiteBoxShadowColor 0 1px 2px 0;
$wildSandGray: #f5f5f5; // pf-black-150

// colors
$curiousBlue: #2b9af3; // pf-blue-300
$lochMaraBlue: #06c; // pf-blue-400
$appleGreen: #3f9c35;
$guardsmanRed: #c00;
$tahitiGold: #ec7a08;

// brand colors
$brand-orange: #ff7314;
$twitter-color: #55acee;
$facebook-color: #3b5998;

// Functional color names
$body-background: $white;
$content-background: $gallery;
$background-color-base: $body-background;
$font-color: $outerSpaceGray;
$color-base: $font-color;
$light-background-color: $alabasterWhite;
$label-color: $osloGray;
$highlight-color: $lochMaraBlue;
$border-color: $altoGray;
$select-color: $border-color;
$focus-color: $alabasterWhite;
$brand-blue: $lochMaraBlue;
$light-color: $osloGray;
$form-background-color: $white;
$hint-color: $osloGray;
$link-color: $highlight-color;
$link-hover-color: $outerSpaceGray;
$icon-hover-color: $lochMaraBlue;
$dirty-color: $alabasterWhite;
$success-color: $appleGreen;
$error-color: $guardsmanRed;
$error-background-color: rgba($error-color, 0.1);
$disabled-color: $osloGray;
$disabled-background-color: $wildSandGray;
$placeholder-color: $osloGray;
$create-color: $success-color;
$delete-color: $error-color;
$delete-background-color: $error-background-color;
$warning-color: $tahitiGold;
$body-background: white;
$border-color: var(--pf-global--palette--black-300);

@akostadinov-bot akostadinov-bot Bot Jul 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low risk — 95 SCSS variables removed, but all internal references cleaned up.

95 SCSS variables were removed and 12 redefined to use PF CSS custom properties. The PR has cleaned up all internal references across 64 SCSS files — zero dangling references remain on the PR branch. No Sass color functions (darken(), lighten(), etc.) are called on the redefined variables.

The only remaining risk is for downstream forks or out-of-tree SCSS that imports these variables by name. Within this repo the migration is clean.

$disabled-color: var(--pf-global--disabled-color--100);
$error-color: var(--pf-global--danger-color--100);
$font-color: var(--pf-global--Color--100);
$highlight-color: var(--pf-global--primary-color--100);
$label-color: var(--pf-global--palette--black-500);
$light-color: var(--pf-global--Color--200);
$link-color: var(--pf-global--link--Color);
$link-hover-color: var(--pf-global--primary-color--200);
$success-color: var(--pf-global--success-color--100);
$warning-color: var(--pf-global--warning-color--100);
$warning-color-hover: var(--pf-global--warning-color--200);
$table-search-background-color: $light-background-color;
$tr-odd-color: transparent;
$tr-even-color: transparent;
$wrapper-color: none;
$header-background-color: $black;
$header-border-color: $curiousBlue;
$tab-menu-active-color: $lochMaraBlue;
$tab-menu-active-background-color: $content-background;
$tab-content-color: $content-background;

// view specific colors
$overview-widget-border: $border-color;
$overview-widget-background: $tab-content-color;
$box-shadow-color: rgba($font-color, .1);
$menu-background-color: $content-background;
$menu-color: $outerSpaceGray;
$menu-active-color: $lochMaraBlue;
$menu-hover-color: $lochMaraBlue;
$submenu-color: $menu-color;
$submenu-hover-color: $menu-hover-color;
$submenu-active-color: $menu-active-color;
$submenu-border-color: $border-color;
$chart-background-color: $white;
$sample-data-color: $white;
$sample-data-bg-color: $lochMaraBlue;
$sample-data-border-color: $lochMaraBlue;
$important-button-color: $white;
$important-button-bg-color: $lochMaraBlue;
$important-button-border-color: $lochMaraBlue;
$secondary-button-color: $white;
$secondary-button-bg-color: $osloGray;
$secondary-button-border-color: $osloGray;
$disabled-button-color: $white;
$disabled-button-bg-color: $altoGray;
$disabled-button-border-color: $altoGray;
$glow-color: $highlight-color;
$glow-background-color: $wildSandGray;

/// --- login ---

$login-content-color: $font-color;
$codemirror-color: $label-color;
$codemirror-border: $content-background;
$codemirror-bg: $content-background;
$codemirror-bg-readonly: $codemirror-bg;
$codemirror-color-readonly: $codemirror-color;
$codemirror-cursor-color: $highlight-color;
$codemirror-vars-color: #00b9e4; // pf-light-blue-400
$codemirror-vars2-color: #703fec; // pf-purple-400
$codemirror-selected-bg: $select-color;
$codemirror-meta-color: $tahitiGold;
$codemirror-attr-color: $tahitiGold;
$codemirror-number-color: $tahitiGold;
$codemirror-comment-color: $label-color;
$codemirror-keyword-color: $tahitiGold;
$codemirror-builtin-color: $highlight-color;
$codemirror-color-def: $tahitiGold;
$codemirror-color-tag: $tahitiGold;
$codemirror-liquid-bg-color: transparent;
$codemirror-liquid-color: $highlight-color;
$codemirror-liquid-tag-color: $label-color;
$codemirror-liquid-markup-delim-color: $highlight-color;
$codemirror-liquid-string-color: $success-color;
$codemirror-gutter-color: $border-color;
$codemirror-gutter-background-color: $codemirror-bg;

:root {
--body-background-color: white;
}
Loading
Loading