Skip to content

Instantly share code, notes, and snippets.

View GregJacobs82's full-sized avatar

Greg Jacobs GregJacobs82

View GitHub Profile
<template>
<div class="corner-label">
<div class="corner-label__text">
DEAL
</div>
</div>
</template>
<style lang="scss" scoped>
.corner-label {
//********************/
//*** ALL CURSORS ***/
//********************/
$cursorsArray: (
alias , // {cursor: alias;}
all-scroll , // {cursor: all-scroll;}
auto , // {cursor: auto;}
cell , // {cursor: cell;}
context-menu , // {cursor: context-menu;}
col-resize , // {cursor: col-resize;}
@GregJacobs82
GregJacobs82 / SCSS: Arrow ( aka "triangle", carrot, window pointer ).scss
Last active February 15, 2021 16:08
CSS Arrows: Top, Left, Right, and Bottom
//************************************************************//
//*** ARROWS ( aka - Triangles, Carrots, Window Pointers ) ***//
//************************************************************//
// Example: <div class="arrow--bottom">
// Example: <div class="arrow--bottom__20"> // places the arrow at 20% along the bottom axis
$arrow-size: 1em; // Note: To change arrow size, simply adjust the font size on the <div class="fs-150rem">
$map-arrow-sides: (
"top": (
top: 0,
@GregJacobs82
GregJacobs82 / responsive-zoom__input.scss
Created February 12, 2021 23:43
SCSS: Responsive Zoom
//*** SCREEN SIZES as Variables ***/
$mobile: 767px; //sm
$tablet: 991px; //md
$desktop: 1370px; //lg //1400 - 15px each side?
$desktop-xl: 1921px; //xl
//*** ALL RESPONSIVE SIZES ***/
$responsiveAllArray: (
/* Then style the iframe to fit in the container div with full height and width */
.responsive-iframe {
position: relative;
overflow: hidden;
width: 100%;
padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
iframe {
position: absolute;
top: 0;
@GregJacobs82
GregJacobs82 / SCSS: Responsive Floats.scss
Last active February 12, 2021 23:36
SCSS: Responsive Floats
//*** SCREEN SIZES as Variables ***/
$mobile: 767px; //sm
$tablet: 991px; //md
$desktop: 1370px; //lg //1400 - 15px each side?
$desktop-xl: 1921px; //xl
//*** ALL RESPONSIVE SIZES ***/
$responsiveAllArray: (
//*** OPACITY ***/
// EXAMPLE OUTPUT: .opacity-50 { opacity: .5; }
@for $i from 1 through 100 {
.opacity-#{$i} {
opacity: #{$i * .01};
}
}
Regex:
(<img(?!.*?alt=(['"]).*?\2)[^>]*)(>)
Replace:
$1 alt="MassageBook Image"$3
$colors: (
a: red,
b: green,
c: blue
);
@each $color, $name in $colors{
$i: index($colors, $color $name);
a:nth-child(#{$i}){ color:$color; }
}
<?php
$themeClassName = '';
switch ($profileSettings->theme_name) {
case "royal-blue":
$themeClassName = "Blue";
break;
case "envious-ivy":
$themeClassName = "Green";
break;