Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ablunier committed Nov 26, 2024
1 parent 5ddb536 commit 8584333
Show file tree
Hide file tree
Showing 29 changed files with 564 additions and 270 deletions.
197 changes: 175 additions & 22 deletions dist/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@numaxlab/atomic",
"version": "0.2.2",
"version": "0.3.0",
"description": "Atomic is a CSS and SCSS framework based in Bootstrap",
"repository": "https://github.com/numaxlab/atomic",
"author": "Laboratorio NUMAX",
Expand Down
7 changes: 5 additions & 2 deletions src/scss/atoms/_heading.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.at-heading {
@extend %heading;

@each $size, $value in $font-sizes {
@each $size, $map in $headings {
&.is-#{$size} {
@include font-size($value);
@include font-size(map-get($map, font-size));
font-weight: map-get($map, font-weight);
line-height: map-get($map, line-height);
letter-spacing: map-get($map, letter-spacing);
}
}
}
1 change: 1 addition & 0 deletions src/scss/atoms/_lead.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.at-lead {
@include font-size($lead-font-size);
line-height: $lead-line-height;
font-weight: $lead-font-weight;
}
1 change: 1 addition & 0 deletions src/scss/atoms/_small.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.at-small {
@include font-size($small-font-size);
line-height: $small-line-height;
}
12 changes: 12 additions & 0 deletions src/scss/base/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,22 @@ body {
font-kerning: normal;
}

@each $size, $map in $headings {
h#{$size} {
font-weight: map-get($map, font-weight);
line-height: map-get($map, line-height);
letter-spacing: map-get($map, letter-spacing);
}
}

img {
@include img-fluid;
}

ul {
list-style-type: disc;
}

[x-cloak] {
display: none !important;
}
21 changes: 12 additions & 9 deletions src/scss/mixins/_generic.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@mixin undo-sr-only {
position: static;
width: auto;
height: auto;
padding: 0;
overflow: visible;
clip: auto;
white-space: normal;
border: 0;
// Check: @bootstrap/mixins/visually-hidden
@mixin undo-visually-hidden {
width: auto !important;
height: auto !important;
margin: auto !important;
overflow: auto !important;
clip: auto !important;
white-space: normal !important;

&:not(caption) {
position: static !important;
}
}
7 changes: 0 additions & 7 deletions src/scss/mixins/_text.scss

This file was deleted.

23 changes: 0 additions & 23 deletions src/scss/mixins/_title.scss

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@mixin module {
@mixin wall-brick {
&.is-xl {
min-height: 20rem;

Expand Down
13 changes: 7 additions & 6 deletions src/scss/molecules/_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$banner-padding: 1.875rem;

.ml-banner {
@include module;
@include wall-brick;

position: relative;
background-color: $gray;
Expand Down Expand Up @@ -32,11 +32,12 @@ $banner-padding: 1.875rem;
.banner-content {
position: relative;
width: 100%;
height: 100%;
padding: $banner-padding;
z-index: 3;
}

.at-title {
.at-heading {
margin-bottom: $spacer;
}

Expand All @@ -45,7 +46,7 @@ $banner-padding: 1.875rem;
}

&.is-xl {
.at-title {
.at-heading {
@include font-size($h1-font-size);
}

Expand All @@ -57,19 +58,19 @@ $banner-padding: 1.875rem;
}

&.is-l {
.at-title {
.at-heading {
@include font-size($h2-font-size);
}
}

&.is-m {
.at-title {
.at-heading {
@include font-size($h3-font-size);
}
}

&.is-s {
.at-title {
.at-heading {
@include font-size($h4-font-size);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/scss/molecules/_pagination.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "bootstrap/scss/pagination";

.ml-pagination {

@extend .pagination;
}
2 changes: 1 addition & 1 deletion src/scss/molecules/_summary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
margin-bottom: map-get($spacers, 1);
}

.at-title {
.at-heading {
@include font-size($h4-font-size);
margin-bottom: map-get($spacers, 1);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
.org-modules-container {
.org-wall {
--#{$prefix}wall-gap: #{$wall-gap};

> * {
margin-bottom: $grid-gutter-width;
margin-bottom: var(--#{$prefix}wall-gap);
}

@include media-breakpoint-up(md) {
display: grid;
grid-gap: $grid-gutter-width;
grid-gap: var(--#{$prefix}wall-gap);
grid-auto-flow: row;
grid-template-columns: repeat(6, 1fr);

Expand All @@ -21,6 +23,16 @@

// Modifiers

&.has-no-gap {
> * {
margin-bottom: 0;
}

@include media-breakpoint-up(md) {
grid-gap: 0;
}
}

&.is-half {
@include media-breakpoint-up(lg) {
grid-template-columns: repeat(6, 1fr);
Expand Down
5 changes: 3 additions & 2 deletions src/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
@import "organisms/site-footer";
@import "organisms/tabs";
@import "organisms/tier";
@import "organisms/modules-container";

@import "organisms/wall";

// Templates
@import "templates/center-body";
@import "templates/grid";
16 changes: 16 additions & 0 deletions src/scss/templates/_center-body.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.tpl-centered-body {
--max-width: 500px;
--margin-inline: 2rem;
--margin-block: 2rem;

.centered-body-wrapper {
box-sizing: border-box;
min-height: calc(100lvh - var(--margin-block) * 2);
margin-block: var(--margin-block);
margin-inline: var(--margin-inline);
display: grid;
grid-template-columns: minmax(0, var(--max-width));
justify-content: center;
align-content: center;
}
}
18 changes: 18 additions & 0 deletions src/scss/templates/_grid.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.tpl-grid {
--column-gap: 1em;
--row-gap: 1em;
--item-min-width: 100px;
--item-max-width: 1fr;

.grid-wrapper {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--item-min-width)), var(--item-max-width)));
column-gap: var(--column-gap);
row-gap: var(--row-gap);

&:where(ul, ol) {
list-style-type: ""; /* Remove list style without removing the role=list in Safari */
padding-left: 0;
}
}
}
4 changes: 1 addition & 3 deletions src/scss/utilities/_init.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@

// Project mixins
@import "../mixins/generic";
@import "../mixins/title";
@import "../mixins/text";
@import "../mixins/buttons";
@import "../mixins/module";
@import "../mixins/wall-brick";
25 changes: 25 additions & 0 deletions src/scss/utilities/variables/_components.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Define common padding and border radius sizes and more.

$border-width: 1px !default;
$border-widths: (
1: 1px,
2: 2px,
3: 3px,
4: 4px,
5: 5px
) !default;
$border-style: solid !default;
$border-color: $gray-400 !default;

$border-radius: 0 !default;

$breadcrumb-separator: '/' !default;

$aspect-ratios: (
"1x1": 100%,
"4x3": calc(3 / 4 * 100%),
"16x9": calc(9 / 16 * 100%),
"21x9": calc(9 / 21 * 100%)
) !default;

$wall-gap: $grid-gutter-width !default;
30 changes: 2 additions & 28 deletions src/scss/utilities/variables/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,32 +155,6 @@ $grid-row-columns: 6 !default;

$container-padding-x: $grid-gutter-width !default;


// Components
//
// Define common padding and border radius sizes and more.

$border-width: 1px !default;
$border-widths: (
1: 1px,
2: 2px,
3: 3px,
4: 4px,
5: 5px
) !default;
$border-style: solid !default;
$border-color: $gray-400 !default;

$border-radius: 0 !default;

$breadcrumb-separator: '/' !default;

$aspect-ratios: (
"1x1": 100%,
"4x3": calc(3 / 4 * 100%),
"16x9": calc(9 / 16 * 100%),
"21x9": calc(9 / 21 * 100%)
) !default;

@import "typography";
@import "forms";
@import "forms";
@import "components";
Loading

0 comments on commit 8584333

Please sign in to comment.