Skip to content

Instantly share code, notes, and snippets.

View MThakkar121's full-sized avatar
:octocat:
Focusing

Mayur Thakkar MThakkar121

:octocat:
Focusing
View GitHub Profile
@MThakkar121
MThakkar121 / mnx.sass
Created July 31, 2019 13:39
min() & max()
$padding: 12px
.post
// Since these max() calls don't use any Sass features other than
// interpolation, they're compiled to CSS max() calls.
padding-left: max(#{$padding}, env(safe-area-inset-left))
padding-right: max(#{$padding}, env(safe-area-inset-right))
.sidebar
@MThakkar121
MThakkar121 / spfun.sass
Created July 31, 2019 10:57
Special functions in Sass
$roboto-font-path: "../fonts/roboto"
@font-face
// This is parsed as a normal function call that takes a quoted string.
src: url("#{$roboto-font-path}/Roboto-Thin.woff2") format("woff2")
font-family: "Roboto"
font-weight: 100
@MThakkar121
MThakkar121 / comments.sass
Last active July 31, 2019 10:46
comment difference
/// Computes an exponent.
///
/// @param {number} $base
/// The number to multiply by itself.
/// @param {integer (unitless)} $exponent
/// The number of `$base`s to multiply together.
/// @return {number} `$base` to the power of `$exponent`.
@function pow($base, $exponent)
$result: 1
@for $_ from 1 through $exponent
@MThakkar121
MThakkar121 / comment.sass
Created July 31, 2019 10:04
comments in sass
// This comment won't be included in the CSS.
This is also commented out.
/* But this comment will, except in compressed mode.
/* It can also contain interpolation:
1 + 1 = #{1 + 1}
/*! This comment will be included even in compressed mode.
@MThakkar121
MThakkar121 / comment.scss
Created July 31, 2019 10:01
comments in scss
// This comment won't be included in the CSS.
/* But this comment will, except in compressed mode. */
/* It can also contain interpolation:
* 1 + 1 = #{1 + 1} */
/*! This comment will be included even in compressed mode. */
p /* Multi-line comments can be written anywhere
@MThakkar121
MThakkar121 / sasssyntax.sass
Created July 31, 2019 09:53
difference syntax and basic sass
@mixin button-base()
@include typography(button)
@include ripple-surface
@include ripple-radius-bounded
display: inline-flex
position: relative
height: $button-height
border: none
vertical-align: middle
@mixin button-base() {
@include typography(button);
@include ripple-surface;
@include ripple-radius-bounded;
display: inline-flex;
position: relative;
height: $button-height;
border: none;
vertical-align: middle;
&:hover {
@MThakkar121
MThakkar121 / sass.sass
Created July 31, 2019 09:38
difference files between scss and sass
//Scss syntax
@mixin button-base() {
@include typography(button);
@include ripple-surface;
@include ripple-radius-bounded;
display: inline-flex;
position: relative;
height: $button-height;
border: none;
vertical-align: middle;
@MThakkar121
MThakkar121 / intro.md
Created July 19, 2019 17:28 — forked from derhuerst/intro.md
Installing Git on Linux, Mac OS X and Windows
@MThakkar121
MThakkar121 / geometric-business-card-with-css-grid.markdown
Created June 21, 2019 17:46
Geometric business card with CSS Grid