Skip to content

Instantly share code, notes, and snippets.

@Alecto
Alecto / toggle-button-snippet
Last active November 19, 2024 14:08
Responsive menu button with animation
https://codepen.io/designcouch/pen/Atyop
https://codepen.io/FomenkoAndrey/pen/wEeKKM
<!-- HTML -->
<div class="header-navbar__btn">
<span class="header-navbar__btn-row"></span>
<span class="header-navbar__btn-row"></span>
<span class="header-navbar__btn-row"></span>
</div>
@Alecto
Alecto / _variables.scss
Last active November 25, 2024 14:55
Scss variables
/* Fonts
* Font settings for the project
*/
$font-primary: 'Roboto', sans-serif; // Main font for text
$font-header: 'Roboto Slab', serif; // Font for headers
$font-icon: 'FontAwesome'; // Icon font
$font-size: 16px; // Base font size
/* Container
* Settings for the main container
@Alecto
Alecto / .gitignore
Last active November 19, 2024 14:26
Custom .gitignore template
### Custom .gitignore template
# System files
.DS_Store
Thumbs.db
# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
@Alecto
Alecto / _skin.scss
Last active November 19, 2024 14:27
Scss skin
/* Primary and Accent Colors */
$color-primary: #2d3651; // Main brand color
$color-accent: #d66926; // Accent color for highlights
$color-highlight: #d53d27; // Highlight color (e.g., for errors or alerts)
/* Neutral Colors */
$color-gray: #637588; // Base gray for text or borders
$color-gray-light: #e5e5e5; // Light gray for backgrounds
$color-gray-light2: #ededed; // Secondary light gray (slightly darker)
$color-gray-dark: #44596e; // Dark gray for headings or emphasis
@Alecto
Alecto / _mixins.scss
Last active November 19, 2024 14:28
Scss mixins
// Reset margin, padding, and remove list-style from a list.
@mixin unlist($m: 0, $p: 0) {
margin: $m;
padding: $p;
list-style: none;
}
// Truncate single-line text with ellipsis if it overflows.
@mixin text-shorten {
overflow: hidden;
@Alecto
Alecto / _mixins-media-standard.scss
Last active November 25, 2024 14:47
Media mixins, standard range: xl, lg, md, sm, xs
@use "../presets" as *;
$diff: 0.2px;
/* xl */
@mixin xl-min {
@media (min-width: $xl) {
@content;
}
}
@Alecto
Alecto / _mixins-media-new.scss
Last active November 27, 2024 10:36
Media mixins, ultra range, new syntax: ul, xl, lg, md, sm, xs, vs, us
@use "../presets" as *;
/* ul */
@mixin ul-min {
@media (#{$ul} <= width) {
@content;
}
}
@mixin ul {
@Alecto
Alecto / .yarnrc
Last active November 19, 2024 14:15
Configuration for the library location in .yarnrc
--modules-folder libs
@Alecto
Alecto / font-awesome-link-code
Last active January 16, 2025 19:04
Font-awesome link code
@Alecto
Alecto / visually-hidden
Last active November 19, 2024 14:13
Visually hidden block
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
white-space: nowrap;
clip-path: inset(100%);