Skip to content

Commit

Permalink
Merge branch 'hotfix/2.1.3'
Browse files Browse the repository at this point in the history
* hotfix/2.1.3: (46 commits)
  fix(package): update project version number from `2.1.2` to `2.1.3`
  refactor(sass): remove empty and unused sections from `styles.sass`
  refactor(sass): remove unused vendor import and add `animations-animate-css` import
  refactor(sass): rename `animation` to `animations-animate`
  refactor(sass): use double quotes instead of single quotes
  refactor(sass): sort imports from the `abstracts` folder as `functions`, `mixins` and `variables`
  refactor(sass): update import paths to reflect renamed files
  refactor(sass): update section title from `BODY and RESET FONT` to `BODY` for clarity
  refactor(sass): add 5 line breaks to improve readability in color variables file
  refactor(sass): update `KEYFRAMES` and `MIXINS` section titles for consistency
  refactor(sass): correct typo in section title from `TYPOGRAFY` to `FONTS`
  refactor(sass): rename `base-typography` to `base-fonts`
  refactor(sass): rename `abstracts-variables-typography` to `abstracts-variables-fonts`
  refactor(sass): update section titles in typography variables for better organization
  refactor(sass): rename `abstracts-mixins-media-queries` to `abstracts-mixins-media`
  refactor(sass): add spaces around `+` operator for improved readability
  refactor(sass): add break lines in `media` mixin for improved readability
  refactor(sass): correct syntax error in `contains` function by adding space before `!= null`
  refactor(sass): fix `Helvetica` font style in `$font-brand-1`
  refactor(sass): rename variables `$font-family` to `$font-brand-1`
  ...
  • Loading branch information
beatrizsmerino committed Nov 23, 2024
2 parents f72daa5 + efc3f4b commit f0f4f52
Show file tree
Hide file tree
Showing 35 changed files with 319 additions and 496 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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,5 +1,5 @@
{
"version": "2.1.2",
"version": "2.1.3",
"name": "validation-form",
"description": "Customized form with validation for different types of fields.",
"author": "beatrizsmerino@gmail.com",
Expand Down
30 changes: 2 additions & 28 deletions src/sass/abstracts/functions/_abstracts-functions-contains.sass
Original file line number Diff line number Diff line change
@@ -1,36 +1,10 @@
// ABSTRACTS - FUNCTIONS
// contain (find contain in a list)
// CONTAINS
// =================================================
// Description:
// ------------------------------------
// This function 'contains' check whether an item belongs to a list or not. For example it`s using in the mixin mediaquery.
// Require:
// ------------------------------------
// This function require:
//
// Args:
// ------------------
// - $list
// @param {List} List of items to check into.
// - $item
// @param {any} Item to check within the list.
//
// This function return:
//
// @return {bool} True/false if the item is contained in the list.
// Use:
// ------------------------------------
// @if not contains($rules, $rule)
// $rule: 'max'
// Declaration:
// ------------------------------------
@function contains($list, $item)
@return index($list, $item) !=null
@return index($list, $item) != null
72 changes: 0 additions & 72 deletions src/sass/abstracts/mixins/_abstracts-mixins-media-queries.scss

This file was deleted.

49 changes: 49 additions & 0 deletions src/sass/abstracts/mixins/_abstracts-mixins-media.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// ABSTRACTS - MIXINS
// MEDIA
// =================================================





@mixin media($breakpoint, $rule: "max", $dimension: "width", $unit: "px") {
$rules: "max", "min";
$dimensions: "width", "height";
$units: "px", "em", "rem", "%", "vw", "vh";

@if not contains($rules, $rule) {
$rule: "max";
}

@if not contains($dimensions, $dimension) {
$rule: "width";
}

@if type-of($breakpoint) == number {
@if unitless($breakpoint) {
@media (#{$rule}-#{$dimension}: #{$breakpoint + $unit}) {
@content;
}
} @else if contains($units, unit($breakpoint)) {
@media (#{$rule}-#{$dimension}: #{$breakpoint}) {
@content;
}
} @else {
@error "Invalid units provided";
}
} @else if variable_exists(breakpoints) {
@if map-has-key($breakpoints, $breakpoint) {
@media (#{$rule}-#{$dimension}: #{inspect(map-get($breakpoints, $breakpoint))}) {
@content;
}
} @else {
@error "Unfortunately, no value could be retrieved from `#{$breakpoint}`. " + "Available breakpoints are: #{map-keys($breakpoints)}.";
}
} @else if variable_exists(breakpoint) {
@media (#{$rule}-#{$dimension}: #{$breakpoint}) {
@content;
}
} @else {
@error "Neither $breakpoints map nor variable provided are defined";
}
}
28 changes: 2 additions & 26 deletions src/sass/abstracts/mixins/_abstracts-mixins-position.sass
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
// ABSTRACTS - MIXIN
// position (top, bottom, left, right)
// ABSTRACTS - MIXINS
// POSITION
// =================================================
// Description:
// ------------------------------------
// $Recycle.BinThis mixin 'position' is used for move the element inside of his element father, who have the property CSS position: relative.
// Require:
// ------------------------------------
// This mixin require:
//
// External means:
// ------------------
// Mixin prefix
//
// Args:
// ------------------
// - $vertical
// @param {string} Position vertical inside of element father.
// Values: center | top | bottom
// - $horizontal
// @param {string} Position horizontal inside of element father.
// Default: NULL
// Values: center | left | right
// Declaration:
// ------------------------------------
@mixin position($vertical, $horizontal: NULL)
position: absolute

Expand Down
38 changes: 4 additions & 34 deletions src/sass/abstracts/mixins/_abstracts-mixins-prefix-animation.sass
Original file line number Diff line number Diff line change
@@ -1,44 +1,14 @@
// ABSTRACTS - MIXIN
// prefix animation
// ABSTRACTS - MIXINS
// PREFIX-ANIMATION
// =================================================
// Description:
// ------------------------------------
// http://joshbroton.com/quick-fix-sass-mixins-for-css-keyframe-animations/
// Require:
// ------------------------------------
// This file need the files:
// tools > _tools-mixins-prefix-keyframes.sass
// tools > _tools-mixins-prefix-animation.sass
// Use:
// ------------------------------------
// use example:
// 1.create keyframe
// animations > _animations-keyframes
//
// @include keyframes(move-the-object)
// 0%
// left: 100px
// 100%
// left: 200px
//
// 2. Call the animation keyframe
// objects > _objects-...sass
//
// .object-to-animate
// @include animation('move-the-object .5s 1', 'move-the-object-again .5s 1 .5s')
// Declaration:
// ------------------------------------
@mixin animation($animate...)
$max: length($animate)
$animations: ''
$animations: ""

@for $i from 1 through $max
$animations: #{$animations + nth($animate, $i)}
Expand All @@ -50,4 +20,4 @@
-webkit-animation: $animations
-moz-animation: $animations
-o-animation: $animations
animation: $animations
animation: $animations
36 changes: 3 additions & 33 deletions src/sass/abstracts/mixins/_abstracts-mixins-prefix-keyframes.sass
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
// ABSTRACTS - MIXIN
// prefix keyframes: webkit moz ms o
// ABSTRACTS - MIXINS
// PREFIX-KEYFRAMES
// =================================================
// Description:
// ------------------------------------
// http://joshbroton.com/quick-fix-sass-mixins-for-css-keyframe-animations/
// Require:
// ------------------------------------
// This file need the files:
// tools > _tools-mixins-prefix-keyframes.sass
// tools > _tools-mixins-prefix-animation.sass
// Use:
// ------------------------------------
// use example:
// 1.create keyframe
// animations > _animations-keyframes
//
// @include keyframes(move-the-object)
// 0%
// left: 100px
// 100%
// left: 200px
//
// 2. Call the animation keyframe
// objects > _objects-...sass
//
// .object-to-animate
// @include animation('move-the-object .5s 1', 'move-the-object-again .5s 1 .5s')
// Declaration:
// ------------------------------------
@mixin keyframes($animationName)
@-webkit-keyframes #{$animationName}
@content
Expand All @@ -47,4 +17,4 @@
@content

@keyframes #{$animationName}
@content
@content
26 changes: 6 additions & 20 deletions src/sass/abstracts/mixins/_abstracts-mixins-prefix.sass
Original file line number Diff line number Diff line change
@@ -1,42 +1,28 @@
// ABSTRACTS - MIXIN
// prefix: webkit moz ms o (transform, transition...)
// ABSTRACTS - MIXINS
// PREFIX
// =================================================
// MIXIN - PREFIX
// PREFIX
// ------------------------------------
@mixin prefix($property, $value, $prefixes: webkit moz ms o)
@each $prefix in $prefixes
#{'-' + $prefix + '-' + $property}: $value
#{"-" + $prefix + "-" + $property}: $value

// Output standard non-prefixed declaration
#{$property}: $value


// Use:
// @include prefix(transform, rotate(45deg))



// MIXIN - TRANSFORM
// TRANSFORM
// ------------------------------------
@mixin prefix--multiple($declarations, $prefixes: webkit moz ms o)
@each $property, $value in $declarations
@each $prefix in $prefixes
#{'-' + $prefix + '-' + $property}: $value
#{"-" + $prefix + "-" + $property}: $value

// Output standard non-prefixed declaration
#{$property}: $value


// Use:
// @include prefix((
// column-count: 3,
// column-gap: 1.5em,
// column-rule: 2px solid hotpink
// ), webkit moz ms o)
Loading

0 comments on commit f0f4f52

Please sign in to comment.