Skip to content

Commit

Permalink
added: gap ".gp" class
Browse files Browse the repository at this point in the history
  • Loading branch information
klich3 committed Oct 25, 2024
1 parent d0330de commit ecb2b1d
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "960.css",
"version": "1.0.9",
"version": "1.0.10",
"description": "960 SCSS Layout most used and shortests css classes.",
"main": "960.scss",
"style": "css/960.css",
Expand Down
27 changes: 27 additions & 0 deletions scss/dom/overflow.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.ofh {
overflow: hidden;
}

.ofv {
overflow: visible;
}

.ofs {
overflow: scroll;
}

.ofsx {
overflow-x: visible;
}

.ofsxh {
overflow-x: hidden;
}

.ofsy {
overflow-y: visible;
}

.ofsyh {
overflow-y: hidden;
}
15 changes: 15 additions & 0 deletions scss/flex/flex.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use "../medias" as *;
@use "../variables" as *;
@use "../functions" as *;

/*
FLEX
Expand Down Expand Up @@ -210,3 +211,17 @@
@include flexBasis("xl");
}
}

@mixin apply-gap($class) {
$gap-value: extract-number($class);
gap: #{$gap-value}px;
}

/* add gap */
.gp {
@for $i from 0 through 50 {
&\[#{$i}\] {
@include apply-gap("gp[#{$i}]");
}
}
}
11 changes: 11 additions & 0 deletions scss/functions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@use "sass:string";

/* FUNCTIONS ---------------------------------------------------------------------- */

@function extract-number($class) {
$start: string.index($class, "[") + 1;
$end: string.index($class, "]") - 1;
@return string.slice($class, $start, $end);
}

/* -------------------------------------------------------------------------------- */
2 changes: 2 additions & 0 deletions scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

@use "global/global.scss";

@use "dom/overflow.scss";

@use "grid/grid.scss";
@use "text/text.scss";
@use "list/list.scss";
Expand Down

0 comments on commit ecb2b1d

Please sign in to comment.