Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| import sass from "node-sass"; | |
| import fs from "fs"; | |
| import process from "process"; | |
| import nodeSassImport from "node-sass-import"; | |
| import path from "path"; | |
| const defaultOpts = { | |
| srcDir: "./src", | |
| outDir: "./dist" | |
| }; |
| // ---- | |
| // Sass (v3.4.21) | |
| // Compass (v1.0.3) | |
| // ---- | |
| /// Map of breakpoints | |
| /// @type Map | |
| $breakpoints: ( | |
| 'small': '(min-width: 860px)', | |
| 'medium': '(min-width: 1000px)', |
| const { exec } = require('child_process') | |
| const { promisify } = require('util') | |
| const chalk = require('chalk') | |
| // See: https://docs.npmjs.com/about-audit-reports#severity | |
| const SEVERITY_LEVELS = ['low', 'moderate', 'high', 'critical'] | |
| const SEVERITY_THRESHOLD = 'critical' | |
| const run = promisify(exec) | |
| // Get the output of a command. If the command exits with a non-zero code, try |
| // ---- | |
| // Sass (v3.4.13) | |
| // Compass (v1.0.3) | |
| // ---- | |
| //// | |
| /// String to number converter | |
| /// @author Hugo Giraudel | |
| /// @access private | |
| //// |
| @supports (padding-top: constant(safe-area-inset-top)) { | |
| body { | |
| padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); | |
| } | |
| } | |
| @media (display-mode: fullscreen) { | |
| body { | |
| padding: 0; | |
| } |
| <img | |
| alt="accessible text" | |
| class="fill-color-red" | |
| height="16" | |
| src="some.svg" | |
| width="16" | |
| onload="fetchSvgInline(this)" | |
| /> |
| module.exports = { | |
| prefix: '', | |
| purge: { | |
| content: [ | |
| './src/**/*.{html,ts}', | |
| ] | |
| }, | |
| darkMode: 'class', // or 'media' or 'class' | |
| theme: { | |
| extend: {}, |
| const { addTailwindPlugin } = require("@ngneat/tailwind"); | |
| const tailwindConfig = require("./tailwind.config.js"); | |
| module.exports = (config) => { | |
| addTailwindPlugin({ | |
| webpackConfig: config, | |
| tailwindConfig, | |
| patchComponentsStyles: true | |
| }); | |
| return config; |
| const path = require('path'); | |
| /** | |
| * Helper function infers Webpack aliases from tsconfig.json compilerOptions.baseUrl and | |
| * compilerOptions.paths. | |
| * | |
| * @param {string} tsconfigPath - Path to tsconfig.json (can be either relative or absolute path). | |
| * @return {object} An object representing analogous Webpack alias. | |
| */ | |
| module.exports = (tsconfigPath = './tsconfig.json') => { |
Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |