Skip to content

Commit

Permalink
✨ 1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
phucbm committed Nov 16, 2022
1 parent b237735 commit a214a5e
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 37 deletions.
62 changes: 31 additions & 31 deletions css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,54 @@
* Flex grid
*/
.flex-grid-template {
--grid-gap-x:30px;
--grid-gap-y:30px;
--grid-col:3;
--grid-gap-x: 30px;
--grid-gap-y: 30px;
--grid-col: 3;
/* calculate new width */
--grid-gap-x-total:calc(var(--grid-gap-x) * (var(--grid-col) - 1));
--grid-space-each:calc(var(--grid-gap-x-total) / var(--grid-col));
display:flex;
flex-wrap:wrap;
gap:var(--grid-gap-y) var(--grid-gap-x);
--grid-gap-x-total: calc(var(--grid-gap-x) * (var(--grid-col) - 1));
--grid-space-each: calc(var(--grid-gap-x-total) / var(--grid-col));
display: flex;
flex-wrap: wrap;
gap: var(--grid-gap-y) var(--grid-gap-x);
}

.flex-grid-template > * {
width:calc(100% / var(--grid-col) - var(--grid-space-each));
width: calc(100% / var(--grid-col) - var(--grid-space-each));
}

@media only screen and (max-width:768px) {
@media only screen and (max-width: 768px) {
.flex-grid-template {
--grid-col:2;
--grid-col: 2;
}
}
@media only screen and (max-width:480px) {
@media only screen and (max-width: 480px) {
.flex-grid-template {
--grid-col:1;
--grid-col: 1;
}
}
/**
* Background object fit
*/
.img-wrapper-cover > img {
object-position:center center;
height:100%;
width:100%;
min-height:100%;
min-width:100%;
max-height:100%;
max-width:100%;
display:block;
object-fit:cover;
object-position: center center;
height: 100%;
width: 100%;
min-height: 100%;
min-width: 100%;
max-height: 100%;
max-width: 100%;
display: block;
object-fit: cover;
}

.img-wrapper-contain > img {
object-position:center center;
height:100%;
width:100%;
min-height:100%;
min-width:100%;
max-height:100%;
max-width:100%;
display:block;
object-fit:contain;
object-position: center center;
height: 100%;
width: 100%;
min-height: 100%;
min-width: 100%;
max-height: 100%;
max-width: 100%;
display: block;
object-fit: contain;
}
58 changes: 57 additions & 1 deletion dist/atomic.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Atomic CSS 1.1.5
* Atomic CSS 1.1.6
* https://github.com/viivue/atomic-css
*/
/**
Expand Down Expand Up @@ -970,3 +970,59 @@
.ar-12 {
aspect-ratio: 1/2;
}

/**
* Flex grid
*/
.flex-grid-template {
--grid-gap-x: 30px;
--grid-gap-y: 30px;
--grid-col: 3;
/* calculate new width */
--grid-gap-x-total: calc(var(--grid-gap-x) * (var(--grid-col) - 1));
--grid-space-each: calc(var(--grid-gap-x-total) / var(--grid-col));
display: flex;
flex-wrap: wrap;
gap: var(--grid-gap-y) var(--grid-gap-x);
}

.flex-grid-template > * {
width: calc(100% / var(--grid-col) - var(--grid-space-each));
}

@media only screen and (max-width: 768px) {
.flex-grid-template {
--grid-col: 2;
}
}
@media only screen and (max-width: 480px) {
.flex-grid-template {
--grid-col: 1;
}
}
/**
* Background object fit
*/
.img-wrapper-cover > img {
object-position: center center;
height: 100%;
width: 100%;
min-height: 100%;
min-width: 100%;
max-height: 100%;
max-width: 100%;
display: block;
object-fit: cover;
}

.img-wrapper-contain > img {
object-position: center center;
height: 100%;
width: 100%;
min-height: 100%;
min-width: 100%;
max-height: 100%;
max-width: 100%;
display: block;
object-fit: contain;
}
4 changes: 2 additions & 2 deletions dist/atomic.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viivue/atomic-css",
"version": "1.1.5",
"version": "1.1.6",
"description": "⚛️ Customizable Atomic CSS Framework.",
"main": "./dist/atomic.min.css",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion scss/_build.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
@import "skeleton";
@import "width-height";
@import "cursors";
@import "aspect-ratio";
@import "aspect-ratio";
@import "extra";
2 changes: 1 addition & 1 deletion scss/_defs.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Definitions
/// DO NOT EDIT!

$version: "1.1.5";
$version: "1.1.6";
$info: ();

// axes
Expand Down

0 comments on commit a214a5e

Please sign in to comment.