-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
303 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@charset "UTF-8"; | ||
|
||
/// Unset item from list. | ||
/// | ||
/// @access private | ||
/// | ||
/// @param {List} $list - List from where will be removed | ||
/// @param {String} $value - What to be removed | ||
/// @param {Boolean} $recursive [false] - List is nested or not | ||
/// | ||
/// @returns {List} | ||
@function splice($list, $value, $recursive: false) { | ||
$result: (); | ||
|
||
// | ||
@for $i from 1 through length($list) { | ||
|
||
// | ||
@if type-of(nth($list, $i)) == list and $recursive { | ||
$result: append($result, remove(nth($list, $i), $value, $recursive)); | ||
} | ||
|
||
// | ||
@else if nth($list, $i) != $value { | ||
$result: append($result, nth($list, $i)); | ||
} | ||
} | ||
|
||
@return $result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@charset "UTF-8"; | ||
|
||
/// Replace string with another string. | ||
/// | ||
/// @access private | ||
/// | ||
/// @param {String} $string - String from which will be replaced | ||
/// @param {String} $search - String which will be removed | ||
/// @param {String} $replace [''] - String which will be placed | ||
/// | ||
/// @returns {String} | ||
@function str-replace($string, $search, $replace: '') { | ||
$index: str-index($string, $search); | ||
|
||
// | ||
@if $index { | ||
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | ||
} | ||
|
||
@return $string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@charset "UTF-8"; | ||
|
||
/// Pseudo selector with end of first-of-type. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:first-of-type | ||
/// | ||
/// @see {mixin} first | ||
|
||
@function first-selector() { | ||
@return unquote("&:first-of-type"); | ||
} | ||
|
||
/// Pseudo selector with end of last-of-type. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:last-of-type | ||
/// | ||
/// @see {mixin} last | ||
|
||
@function last-selector() { | ||
@return unquote("&:last-of-type"); | ||
} | ||
|
||
/// Pseudo selector with end of nth-child(even). | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:nth-child(even) | ||
/// | ||
/// @see {mixin} even | ||
|
||
@function even-selector() { | ||
@return unquote("&:nth-child(even)"); | ||
} | ||
|
||
/// Pseudo selector with end of nth-child(odd). | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:nth-child(odd) | ||
/// | ||
/// @see {mixin} odd | ||
|
||
@function odd-selector() { | ||
@return unquote("&:nth-child(odd)"); | ||
} | ||
|
||
/// Pseudo selector with end of before. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &::before | ||
/// | ||
/// @see {mixin} before | ||
|
||
@function before-selector() { | ||
@return unquote("&::before"); | ||
} | ||
|
||
/// Pseudo selector with end of after. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &::after | ||
/// | ||
/// @see {mixin} after | ||
|
||
@function after-selector() { | ||
@return unquote("&::after"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
@charset "UTF-8"; | ||
|
||
/// Pseudo selector with end of hover. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:hover | ||
/// | ||
/// @see {mixin} hover | ||
|
||
@function hover-selector() { | ||
@return unquote("&:hover"); | ||
} | ||
|
||
/// Pseudo selector with end of focus. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:focus | ||
/// | ||
/// @see {mixin} focus | ||
|
||
@function focus-selector() { | ||
@return unquote("&:focus"); | ||
} | ||
|
||
/// Pseudo selector with end of active. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:active | ||
/// | ||
/// @see {mixin} active | ||
|
||
@function active-selector() { | ||
@return unquote("&:active"); | ||
} | ||
|
||
/// Pseudo selector with end of checked. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &:checked | ||
/// | ||
/// @see {mixin} checked | ||
|
||
@function checked-selector() { | ||
@return unquote("&:checked"); | ||
} | ||
|
||
/// Selector with state of disabled. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &[disabled] | ||
/// | ||
/// @see {mixin} disabled | ||
|
||
@function disabled-selector() { | ||
@return unquote("&[disabled]"); | ||
} | ||
|
||
/// Selector with state of readonly. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &[readonly] | ||
/// | ||
/// @see {mixin} readonly | ||
|
||
@function readonly-selector() { | ||
@return unquote("&[readonly]"); | ||
} | ||
|
||
/// Selector with state of contenteditable. | ||
/// | ||
/// @access private | ||
/// | ||
/// @returns {String} - &[contenteditable='true'] | ||
/// | ||
/// @see {mixin} contenteditable | ||
|
||
@function contenteditable-selector() { | ||
@return unquote("&[contenteditable='true']"); | ||
} | ||
|
||
|
||
/// @alias contenteditable-selector | ||
|
||
@function editable-selector() { | ||
@return contenteditable-selector(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.