Skip to content

Commit

Permalink
Merge pull request #94 from Black-Axis/dev
Browse files Browse the repository at this point in the history
feat(utils): ✨ add `font-size` as utility classes
  • Loading branch information
krypton225 authored Nov 16, 2024
2 parents 296ea3a + 359dd36 commit 94d979d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/utils/typography/_font-size.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@charset "UTF-8";

// @description
// * font-size utility class.
// * This file provides the `font-size` utility class.
// * It can be used as a standalone class in any where it is needed.

// @access public

// @version 1.0.0

// @author Khaled Mohamed

// @license MIT

// @repository: https://github.com/Black-Axis/sass-pire

// @namespace utils

// @module utils/font-size

// @dependencies:
// * Nothing.

// @example
// * <div class="u-small"></div>

// @output
// * .u-small {
// * font-size: small;
// * }

$font-size-values: (
xx-small: xx-small,
x-small: x-small,
small: small,
smaller: smaller,
medium: medium,
large: large,
larger: larger,
x-large: x-large,
xx-large: xx-large,
);

@each $font-size-class-name, $font-size-value in $font-size-values {
.u-#{$font-size-class-name} {
font-size: $font-size-value;
}
}
5 changes: 5 additions & 0 deletions src/utils/typography/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@
// * This module likely contains display white-space as class.
// @see white-space
@forward "white-space";

// * forwarding the "font-size" module.
// * This module likely contains display font-size as class.
// @see font-size
@forward "font-size";

0 comments on commit 94d979d

Please sign in to comment.