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

Adding Prefix To all Leap Atom Classes #24

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
87571d3
updating block grid to work with leap prefix
thinmatt Sep 1, 2017
976b977
adding in prefix for border elements
thinmatt Sep 1, 2017
30d4a7e
continuing to replace border classes with prefix
thinmatt Sep 1, 2017
cc60c77
combing through the rest of the styleguide to update border to use pr…
thinmatt Sep 1, 2017
5d99502
updating uses for button class around styleguide pages
thinmatt Sep 1, 2017
be0a8d3
adding in prefix for colors
thinmatt Sep 1, 2017
4eed323
adding in prefixes for display and grabbing a few border classes as w…
thinmatt Sep 1, 2017
e6af098
updating flex classes on flexbox page
thinmatt Sep 1, 2017
6f7385e
updating reponsive example with flex
thinmatt Sep 1, 2017
f0f863b
prefixing for float classes
thinmatt Sep 1, 2017
5f84886
fixing missing block prefix in color js
thinmatt Sep 1, 2017
720822e
replacing more float classes
thinmatt Sep 1, 2017
6712831
updating form classes with prefix and compiling the updated CSS files
thinmatt Sep 1, 2017
e46de5d
fixing syntax error where I double prefixed form styles
thinmatt Sep 1, 2017
dec3e4d
adding in more prefixing for advanced selectors
thinmatt Sep 1, 2017
9fd24b7
adding in grid prefixes
thinmatt Sep 1, 2017
3f69e93
adding in border prefix for release notes
thinmatt Sep 1, 2017
ff359b7
updating leap icon classes
thinmatt Sep 1, 2017
c8cc5b9
adding in margin prefix to sass and layout file
thinmatt Sep 1, 2017
a81ccf7
adding in margin prefixes to style guide layouts
thinmatt Sep 1, 2017
da706b9
updating grid layout with block prefix
thinmatt Sep 1, 2017
99a8d92
Adding in more margin prefixes
thinmatt Sep 1, 2017
8009d9b
adding in more margin prefixes
thinmatt Sep 1, 2017
48a50e4
adding in updated css files
thinmatt Sep 1, 2017
4b4e43a
catching last of the margin prefixes
thinmatt Sep 1, 2017
8b8336c
cleaning out a rogue prefix inside a class name
thinmatt Sep 1, 2017
457efe2
adding in overflow prefixes
thinmatt Sep 1, 2017
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
2 changes: 1 addition & 1 deletion _includes/icon.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% capture id %}{% increment uniqueid %}{% endcapture %}
<svg viewBox="{% if include.icon-size %}0 0 {{ include.icon-size }} {{ include.icon-size }}{% else %} 0 0 16 16{% endif %}" role="img" class="icon {% if include.icon-size %}icon-{{ include.icon-size }}{% else %}icon-16{% endif %} icon-{{ include.icon }} {{include.class}}"
<svg viewBox="{% if include.icon-size %}0 0 {{ include.icon-size }} {{ include.icon-size }}{% else %} 0 0 16 16{% endif %}" role="img" class="thl-icon {% if include.icon-size %}thl-icon-{{ include.icon-size }}{% else %}thl-icon-16{% endif %} thl-icon-{{ include.icon }} {{include.class}}"
aria-labelledby="{% if include.title %}title-{{ id }}{% endif %}{% if include.desc %} desc-{{ id }}{% endif %}">
{% if include.title %}
<title id="title-{{ id }}">{{ include.title }}</title>
Expand Down
2 changes: 1 addition & 1 deletion _includes/subnav.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="m-l-4-lg p-3-lg p-r-0-lg border-l-lg">
<div class="thl-m-l-4-lg p-3-lg p-r-0-lg thl-border-l-lg">
<ul class="subnav list-unstyled">
{% for p in page.subnav %}
<li class="subnav-item">
Expand Down
8 changes: 4 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<main class="guide-main" role="main">
<div class="guide-content">

<h1 class="border-b-xs p-b-05-xs m-b-4-xs">{{ page.title }}</h1>
<h1 class="thl-border-b-xs p-b-05-xs thl-m-b-4-xs">{{ page.title }}</h1>

<div class="col-container">
<div class="col col-80-lg">
<div class="thl-col-container">
<div class="thl-col thl-col-80-lg">
{{ content }}
</div>
<div class="hide-xs block-lg col col-20-lg subnav-container">
<div class="thl-hide-xs thl-block-lg thl-col thl-col-20-lg subnav-container">
{% include subnav.html %}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<main class="guide-main" role="main">
<div class="guide-content">

<h1 class="border-b-xs p-b-05-xs m-b-4-xs">{{ page.title }}</h1>
<h1 class="thl-border-b-xs p-b-05-xs thl-m-b-4-xs">{{ page.title }}</h1>

{{ content }}

</div>
</main>

Expand Down
2 changes: 2 additions & 0 deletions _sass/leap/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
$leap-version: "0.8.7";

$leap-prefix: thl;

// Brand Colors
$brand-colors: (
"green": #5fcf80,
Expand Down
8 changes: 4 additions & 4 deletions _sass/leap/atoms/_block-grid.sass
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Block grid structures
.block
.#{$leap-prefix}-block
&-grid
padding: 0 !important
list-style: none !important
font-size: 0 !important
display: block !important
overflow: hidden !important
margin-bottom: 2rem !important

&-gutters
margin: -1rem -1rem 1rem -1rem !important
.block-grid__item
.#{$leap-prefix}-block-grid__item
padding: 1rem !important

&__item
Expand All @@ -25,7 +25,7 @@

// Iterate from 1-6 to create different block division classes
@for $num from 1 through 6
.block-#{$num}-#{$suffix} .block-grid__item
.#{$leap-prefix}-block-#{$num}-#{$suffix} .#{$leap-prefix}-block-grid__item
width: 100%/$num !important

// If we aren't a block-1 we need to reset and set clear
Expand Down
16 changes: 8 additions & 8 deletions _sass/leap/atoms/_border.sass
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ $border-values: normal, dark, mid, light
// We don't want a modifier on the normal style,
// so we need a conditional to control that
@if $value == normal
.border-#{$suffix}
.#{$leap-prefix}-border-#{$suffix}
border: solid 1px border-var($value) !important
@else
.border-#{$value}-#{$suffix}
.#{$leap-prefix}-border-#{$value}-#{$suffix}
border: solid 1px border-var($value) !important

// Iterate through each type in $border-types
Expand All @@ -25,10 +25,10 @@ $border-values: normal, dark, mid, light
// We don't want a modifier on the normal style,
// so we need a conditional to control that
@if $value == normal
.border-#{$shorthand}-#{$suffix}
.#{$leap-prefix}-border-#{$shorthand}-#{$suffix}
border-#{$border}: solid 1px border-var($value) !important
@else
.border-#{$shorthand}-#{$value}-#{$suffix}
.#{$leap-prefix}-border-#{$shorthand}-#{$value}-#{$suffix}
border-#{$border}: solid 1px border-var($value) !important


Expand All @@ -37,12 +37,12 @@ $border-values: normal, dark, mid, light
@mixin border-none($suffix)

// Create style for border none on all sides
.border-none-#{$suffix}
.#{$leap-prefix}-border-none-#{$suffix}
border: none !important

// Iterate through border sides and create border none styles
@each $border, $shorthand in $border-types
.border-none-#{$shorthand}-#{$suffix}
.#{$leap-prefix}-border-none-#{$shorthand}-#{$suffix}
border-#{$border}: none !important


Expand All @@ -51,7 +51,7 @@ $border-values: normal, dark, mid, light
@mixin border-radius

// Create style for border radius classes
.round
.#{$leap-prefix}-round
border-radius: $border-radius !important
&-t
border-radius: $border-radius $border-radius 0 0 !important
Expand All @@ -63,7 +63,7 @@ $border-values: normal, dark, mid, light
border-radius: 0 $border-radius $border-radius 0 !important

// Create the circle class
.circle
.#{$leap-prefix}-circle
border-radius: 9999px !important


Expand Down
14 changes: 7 additions & 7 deletions _sass/leap/atoms/_button.sass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.button
.#{$leap-prefix}-button
+appearance(none)
+user-select(none)
background-color: transparent
Expand Down Expand Up @@ -205,7 +205,7 @@
color: darken(topic-color(#{$topic}, base), 10%) !important
svg
fill: darken(topic-color(#{$topic}, base), 10%) !important
&.button--primary
&.#{$leap-prefix}-button--primary
background-color: topic-color(#{$topic}, base) !important
border-color: topic-color(#{$topic}, base) !important
color: #fff !important
Expand All @@ -216,23 +216,23 @@
fill: #fff !important

// Split Buttons
.split-button &
.#{$leap-prefix}-split-button &
float: left
z-index: 1
margin: 0 !important
border-radius: $border-radius 0 0 $border-radius
padding: 0 20px
+selected
z-index: 2
&.button--primary
&.#{$leap-prefix}-button--primary
border-right-color: rgba(#000, 0.1)
+ .button
+ .#{$leap-prefix}-button
border-radius: 0 $border-radius $border-radius 0
margin-left: -2px !important
&.button--primary
&.#{$leap-prefix}-button--primary
border-left-color: rgba(#000, 0.1)

.split-button
.#{$leap-prefix}-split-button
+clearfix
display: inline-block
margin: 0 15px 0 0
26 changes: 13 additions & 13 deletions _sass/leap/atoms/_color.sass
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ $properties: fill stroke color border-color background-color
//
// Else just use the regular property name
@if $property == background-color
.brand-bg-#{$color-name}
.#{$leap-prefix}-brand-bg-#{$color-name}
#{$property}: brand-color($color-name) !important
@else if $property == border-color
.brand-border-#{$color-name}
.#{$leap-prefix}-brand-border-#{$color-name}
#{$property}: brand-color($color-name) !important
@else
.brand-#{$property}-#{$color-name}
.#{$leap-prefix}-brand-#{$property}-#{$color-name}
#{$property}: brand-color($color-name) !important


Expand All @@ -41,10 +41,10 @@ $properties: fill stroke color border-color background-color
//
// Else just use the regular property name
@if $property == background-color
.bg-#{$color-name}
.#{$leap-prefix}-bg-#{$color-name}
#{$property}: ui-color($color-name) !important
@else if $property == border-color
.border-#{$color-name}
.#{$leap-prefix}-border-#{$color-name}
#{$property}: ui-color($color-name) !important
@else
.#{$property}-#{$color-name}
Expand All @@ -66,10 +66,10 @@ $properties: fill stroke color border-color background-color
//
// Else just use the regular property name
@if $property == background-color
.bg-#{$color-name}
.#{$leap-prefix}-bg-#{$color-name}
#{$property}: gray-color($color-name) !important
@else if $property == border-color
.border-#{$color-name}
.#{$leap-prefix}-border-#{$color-name}
#{$property}: gray-color($color-name) !important
@else
.#{$property}-#{$color-name}
Expand All @@ -91,13 +91,13 @@ $properties: fill stroke color border-color background-color
//
// Else just use the regular property name
@if $property == background-color
.text-bg-#{$color-name}
.#{$leap-prefix}-text-bg-#{$color-name}
#{$property}: text-color($color-name) !important
@else if $property == border-color
.text-border-#{$color-name}
.#{$leap-prefix}-text-border-#{$color-name}
#{$property}: text-color($color-name) !important
@else
.text-#{$property}-#{$color-name}
.#{$leap-prefix}-text-#{$property}-#{$color-name}
#{$property}: text-color($color-name) !important


Expand All @@ -117,11 +117,11 @@ $properties: fill stroke color border-color background-color
//
// Else just use the regular property name
@if $property == background-color
.topic-bg-#{$color-name}-#{$color-value}
.#{$leap-prefix}-topic-bg-#{$color-name}-#{$color-value}
#{$property}: map-get($color, $color-value) !important
@else if $property == border-color
.topic-border-#{$color-name}-#{$color-value}
.#{$leap-prefix}-topic-border-#{$color-name}-#{$color-value}
#{$property}: map-get($color, $color-value) !important
@else
.topic-#{$property}-#{$color-name}-#{$color-value}
.#{$leap-prefix}-topic-#{$property}-#{$color-name}-#{$color-value}
#{$property}: map-get($color, $color-value) !important
2 changes: 1 addition & 1 deletion _sass/leap/atoms/_display.sass
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $display-types: block, hide, inline, inline-block

// Iterate through each type in $display-types
@each $type in $display-types
.#{$type}-#{$suffix}
.#{$leap-prefix}-#{$type}-#{$suffix}

// We want to use the class "hide" for display: none,
// so we need a conditional to make that happen.
Expand Down
28 changes: 14 additions & 14 deletions _sass/leap/atoms/_flexbox.sass
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Adds flex and flex-inline classes
@mixin flex-container($suffix)
.flex
.#{$leap-prefix}-flex
&-block-#{$suffix}
display: flex !important
&-inline-#{$suffix}
Expand All @@ -9,18 +9,18 @@
// Adds flex direction classes
@mixin flex-direction($suffix)
@each $direction in row, row-reverse, column, column-reverse
.flex-#{$direction}-#{$suffix}
.#{$leap-prefix}-flex-#{$direction}-#{$suffix}
flex-direction: $direction !important

// Adds flex wrap classes
@mixin flex-wrap($suffix)
@each $type in wrap, nowrap, wrap-reverse
.flex-#{$type}-#{$suffix}
.#{$leap-prefix}-flex-#{$type}-#{$suffix}
flex-wrap: $type !important

// Adds justify-content classes
@mixin flex-justify-content($suffix)
.flex-justify
.#{$leap-prefix}-flex-justify
&-start-#{$suffix}
justify-content: flex-start !important
&-end-#{$suffix}
Expand All @@ -34,7 +34,7 @@

// Adds align-items classes
@mixin flex-align-items($suffix)
.flex-item
.#{$leap-prefix}-flex-item
&-start-#{$suffix}
align-items: flex-start !important
&-end-#{$suffix}
Expand All @@ -48,7 +48,7 @@

// Adds align-content classes
@mixin flex-align-content($suffix)
.flex-content
.#{$leap-prefix}-flex-content
&-start-#{$suffix}
align-content: flex-start !important
&-end-#{$suffix}
Expand All @@ -65,44 +65,44 @@
// Adds flex-order classes
@mixin flex-order($suffix)
@each $num in 1,2,3,4,5,6
.flex-order-#{$num}-#{$suffix}
.#{$leap-prefix}-flex-order-#{$num}-#{$suffix}
order: $num !important

// Adds flex-grow classes
@mixin flex-grow($suffix)
@each $num in 0,1,2,3,4,5,6
.flex-grow-#{$num}-#{$suffix}
.#{$leap-prefix}-flex-grow-#{$num}-#{$suffix}
flex-grow: $num !important

// Adds flex-shrink classes
@mixin flex-shrink($suffix)
@each $num in 1,2,3,4,5,6
.flex-shrink-#{$num}-#{$suffix}
.#{$leap-prefix}-flex-shrink-#{$num}-#{$suffix}
flex-shrink: $num !important

// Adds flex-basis classes
@mixin flex-basis($suffix)
$widths: 5, 10, 15, 20, 25, 30, 33, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, auto
@each $width in $widths
@if $width == auto
.flex-basis-auto-#{$suffix}
.#{$leap-prefix}-flex-basis-auto-#{$suffix}
flex-basis: $width !important
@else
.flex-basis-#{$width}-#{$suffix}
.#{$leap-prefix}-flex-basis-#{$width}-#{$suffix}
flex-basis: percentage($width/100) !important
@each $unit, $value in $spacing
// We don't want a class of "0.5" so we use a conditional to
// let us rename is at "05" in this instance
@if $unit == 0.5
.flex-basis-s05-#{$suffix}
.#{$leap-prefix}-flex-basis-s05-#{$suffix}
flex-basis: spacing($unit) !important
@else
.flex-basis-s#{$unit}-#{$suffix}
.#{$leap-prefix}-flex-basis-s#{$unit}-#{$suffix}
flex-basis: spacing($unit) !important

// Adds align-self classes
@mixin flex-align-self($suffix)
.flex-self
.#{$leap-prefix}-flex-self
&-auto-#{$suffix}
align-self: auto !important
&-start-#{$suffix}
Expand Down
2 changes: 1 addition & 1 deletion _sass/leap/atoms/_float.sass
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Creates the style declarations for each float type
@mixin float-style($suffix)
.float
.#{$leap-prefix}-float
&-l-#{$suffix}
float: left !important

Expand Down
Loading