Skip to content

Instantly share code, notes, and snippets.

View salazarr-js's full-sized avatar

Jose Salazar salazarr-js

View GitHub Profile
@salazarr-js
salazarr-js / main.scss
Created September 18, 2024 18:18
Scss theme mixin
@mixin theme($theme) {
@at-root #{selector-nest(':root[data-theme=#{$theme}]', &)} {
@content;
}
}
:root {
--bg-color: lightcoral;
}
@salazarr-js
salazarr-js / tailwind-preflight.css
Created January 24, 2023 13:07
Tailwind preflight
/* ! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com */
*,
::before,
::after {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: #e5e7eb;
content: '';
@salazarr-js
salazarr-js / playwright.ts
Last active November 17, 2022 17:58
Playwright lib hook
import { chromium, LaunchOptions } from 'playwright'
import type { Browser, BrowserContext, Page } from 'playwright'
/** */
type UsePlaywrightCallback = (opt: { browser: Browser, ctx: BrowserContext, page: Page }) => Promise<void>
/** Expose a `playwright` browser, context and page to a callback that automatically close after finishing */
export async function usePlaywright(cb: UsePlaywrightCallback): Promise<void> {
@salazarr-js
salazarr-js / README.md
Created May 16, 2022 20:55
NodeJs + Typescript
@salazarr-js
salazarr-js / README.md
Last active August 26, 2022 22:28
Windi/Tailwind scss

Windi/Tailwind scss

List of useful Windi/Tailwind variables and utils ready to use.

Colors

Just import in your .scss file

@use "./colors" as *;
@salazarr-js
salazarr-js / app.component.html
Last active February 1, 2020 23:36
NGXS: Reactive Counter
<header class="counter-header">
<h2>NGXS: Reactive Counter</h2>
</header>
<main class="counter-container">
<h2 class="counter-number">The button has been clicked <b>{{ counter }}</b> times</h2>
</main>
<button class="counter-button" (click)="increment()"></button>
@salazarr-js
salazarr-js / readme.md
Last active December 7, 2018 05:17
Flutter Knowledge
@salazarr-js
salazarr-js / example.html
Last active March 26, 2018 16:09
Swipe Remove Directive for Ionic 3.9.2 - Angular 5.0.3
<ion-content padding>
<h3 ion-text color="primary" text-center>Swipe remove directive</h3>
<ion-list>
<button ion-item *ngFor="let item of items; let i=index" (click)="onClick(item)" (swipe-remove)="removeItem($event, i)">
<ion-thumbnail item-start>
<img src="http://placehold.it/100">
</ion-thumbnail>
<h2>My Neighbor Totoro</h2>
<p>Hayao Miyazaki • 1988</p>