Skip to content

Commit

Permalink
console,account: Remove unused or duplicate global style definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
kschiffer committed Jan 18, 2024
1 parent 1e40404 commit c72a6a8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 114 deletions.
2 changes: 1 addition & 1 deletion pkg/webui/console/containers/applications-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const ApplicationsTable = props => {
align: 'center',
render: deviceCount =>
typeof deviceCount !== 'number' ? (
<Spinner micro center inline after={100} className="c-subtle-gray" />
<Spinner micro center inline after={100} className="c-icon" />
) : (
<strong>
<FormattedNumber value={deviceCount} />
Expand Down
3 changes: 1 addition & 2 deletions pkg/webui/styles/include.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

// ATTENTION!
// ==========
//
// Includes added here will be applied for every stylus file in the project
// and is meant for global definitions, such as variables and mixins.
// Be careful not to include files that include style definitions, as
// this will result in many duplicate style definitions.
// this will result in many duplicate definitions.

@require 'nib'

Expand Down
75 changes: 0 additions & 75 deletions pkg/webui/styles/main.styl
Original file line number Diff line number Diff line change
Expand Up @@ -94,81 +94,6 @@ summary

// Global one-off styles.
:global
.c-error
color: var(--c-bg-error-normal)

.c-success
color: var(--c-bg-success-normal)

.c-warning
color: var(--c-bg-warning-normal)

.c-active
color: var(--c-text-brand-normal)

.tc-subtle-gray
color: var(--c-text-neutral-light)

.tc-deep-gray
color: var(--c-text-neutral-heavy)

.p-0
padding: 0 !important

.pt-0
margin-top: 0 !important

.pb-0
margin-bottom: 0 !important

.m-0
margin: 0 !important

.mt-0
margin-top: 0 !important

.mb-0
margin-bottom: 0 !important

for $size in 'xxs' 'xs' 's' 'l' 'm' 'l' 'xl' 'xxl'
.mt-cs-{$size}
margin-top: $cs[$size] !important

.mb-cs-{$size}
margin-bottom: $cs[$size] !important

.ml-cs-{$size}
margin-left: $cs[$size] !important

.mr-cs-{$size}
margin-right: $cs[$size] !important

for $size in 'xxs' 'xs' 's' 'l' 'm' 'l' 'xl' 'xxl'
.mt-ls-{$size}
margin-top: $ls[$size] !important

.mb-ls-{$size}
margin-bottom: $ls[$size] !important

.ml-ls-{$size}
margin-left: $ls[$size] !important

.mr-ls-{$size}
margin-right: $ls[$size] !important

for $size in 'xxs' 'xs' 's' 'l' 'm' 'l' 'xl' 'xxl'
.pt-cs-{$size}
padding-top: $cs[$size] !important

.pb-cs-{$size}
padding-bottom: $cs[$size] !important

.pl-cs-{$size}
padding-left: $cs[$size] !important

.pr-cs-{$size}
padding-right: $cs[$size] !important

.panel-title
padding-bottom: $cs.xs
border-bottom: 1px solid var(--c-border-neutral-light)
37 changes: 1 addition & 36 deletions pkg/webui/styles/mixins.styl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ border-input($side = '', $width = 1px)
$prefix = '-'
if $side == ''
$prefix = ''
border{$prefix + $side}: $width solid var(--c-border-neutral-semibold)
border{$prefix + $side}: $width solid var(--c-border-neutral-normal)

border-subtle($side = '', $width = 1px)
$prefix = '-'
Expand Down Expand Up @@ -61,41 +61,6 @@ pseudo-border-animated($size, $color)
transform: scaleX(1)



// COLORS
// ======

// Darker/lighter is used to step through color shadings in a consistent
// way (using steps). Consider using an already defined color or defining
// a new one altogether when applicable. Only use with full integer steps.
darker($color, $step = 1)
darken($color, 5 * $step)

lighter($color, $step = 1)
lighten($color, 5 * $step)

// Hoverize and activize will return shaded values for active and hover state.
// This will improve consistency for shaded colors.
hoverize($color)
if ($color == var(--c-text-brand-normal))
var(--c-text-brand-normal)-hover
else
darker($color, 2)

activize($color)
if ($color == var(--c-text-brand-normal))
var(--c-text-brand-normal)-active
else
darker($color, 3)

// For text colors and lines
tc-hoverize($color)
if ($color == var(--c-text-brand-normal))
var(--c-text-brand-normal)-hover
else
darker($color, 2)


// POSITIONING
// ======

Expand Down

0 comments on commit c72a6a8

Please sign in to comment.