Compare commits
16 Commits
131252bd67
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
994107305b | ||
|
|
514dc490b5 | ||
|
|
f4782bc9cd | ||
|
|
361f57424c | ||
|
|
5b7fed2cb8 | ||
|
|
3ef6385935 | ||
|
|
a90272f0af | ||
|
|
57129db550 | ||
|
|
a420cc430e | ||
|
|
45fe3b1cf0 | ||
|
|
c07436c1f6 | ||
|
|
8ef9e0c759 | ||
|
|
179754d6d0 | ||
|
|
7d24009fae | ||
|
|
dc33dea120 | ||
|
|
bc9cf9bcdb |
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
@@ -3,6 +3,14 @@
|
|||||||
"tree.indentGuidesStroke": "#3d92ec",
|
"tree.indentGuidesStroke": "#3d92ec",
|
||||||
"activityBar.background": "#213309",
|
"activityBar.background": "#213309",
|
||||||
"titleBar.activeBackground": "#2E470C",
|
"titleBar.activeBackground": "#2E470C",
|
||||||
"titleBar.activeForeground": "#F6FCEE"
|
"titleBar.activeForeground": "#F6FCEE",
|
||||||
|
"titleBar.inactiveBackground": "#213209",
|
||||||
|
"titleBar.inactiveForeground": "#F7FCEF",
|
||||||
|
"statusBar.background": "#213209",
|
||||||
|
"statusBar.foreground": "#F7FCEF",
|
||||||
|
"statusBar.debuggingBackground": "#213209",
|
||||||
|
"statusBar.debuggingForeground": "#F7FCEF",
|
||||||
|
"statusBar.noFolderBackground": "#213209",
|
||||||
|
"statusBar.noFolderForeground": "#F7FCEF"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,17 +8,17 @@ const start = performance.now();
|
|||||||
|
|
||||||
// Tailwind to CSS
|
// Tailwind to CSS
|
||||||
try {
|
try {
|
||||||
// Ensure the output directory exists
|
// Ensure the output directory exists
|
||||||
if (!fs.existsSync(distDir)) {
|
if (!fs.existsSync(distDir)) {
|
||||||
fs.mkdirSync(distDir, { recursive: true });
|
fs.mkdirSync(distDir, { recursive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile Tailwind
|
// Compile Tailwind
|
||||||
tailwindToCSS();
|
tailwindToCSS();
|
||||||
|
|
||||||
const end = performance.now();
|
const end = performance.now();
|
||||||
const runtime = (end - start).toFixed(3);
|
const runtime = (end - start).toFixed(3);
|
||||||
console.log(`Production build successfully run in ${runtime}ms`);
|
console.log(`Production build successfully run in ${runtime}ms`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error processing CSS files:", error);
|
console.error("Error processing CSS files:", error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ const cwd = path.resolve("..");
|
|||||||
|
|
||||||
// Compile Tailwind
|
// Compile Tailwind
|
||||||
module.exports.tailwindToCSS = debounce(() => {
|
module.exports.tailwindToCSS = debounce(() => {
|
||||||
try {
|
try {
|
||||||
require("child_process").execSync(
|
require("child_process").execSync(
|
||||||
`npx @tailwindcss/cli -i styles/theme.css -o static/dist/theme.css`,
|
`./node_modules/.bin/tailwindcss -i styles/theme.css -o static/dist/theme.css`,
|
||||||
{ stdio: "inherit" }
|
{ stdio: "inherit" }
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`Error compiling Tailwind to CSS:`, error);
|
console.log(`Error compiling Tailwind to CSS:`, error);
|
||||||
}
|
}
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|||||||
@@ -10,39 +10,39 @@ const cwd = path.resolve("../");
|
|||||||
|
|
||||||
// Initialize BrowserSync
|
// Initialize BrowserSync
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
proxy: process.env.LOCALHOST_URL,
|
proxy: process.env.LOCALHOST_URL,
|
||||||
port: process.env.BROWSERSYNC_PORT,
|
port: process.env.BROWSERSYNC_PORT,
|
||||||
cors: true,
|
cors: true,
|
||||||
cwd: cwd,
|
cwd: cwd,
|
||||||
logLevel: `warn`,
|
logLevel: `warn`,
|
||||||
minify: false,
|
minify: false,
|
||||||
open: false,
|
open: false,
|
||||||
ui: false,
|
ui: false,
|
||||||
ghostMode: false,
|
ghostMode: false,
|
||||||
reloadOnRestart: true,
|
reloadOnRestart: true,
|
||||||
notify: false,
|
notify: false,
|
||||||
watch: true,
|
watch: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reload JS during development
|
// Reload JS during development
|
||||||
browserSync.watch(`static/js/*.js`, (event, file) => {
|
browserSync.watch(`static/js/*.js`, (event, file) => {
|
||||||
if (event !== "change") return;
|
if (event !== "change") return;
|
||||||
|
|
||||||
const start = performance.now();
|
const start = performance.now();
|
||||||
try {
|
try {
|
||||||
browserSync.stream();
|
browserSync.stream();
|
||||||
const end = performance.now();
|
const end = performance.now();
|
||||||
const runtime = (end - start).toFixed(3);
|
const runtime = (end - start).toFixed(3);
|
||||||
console.log(`JS re-injected successfully in ${runtime}ms`);
|
console.log(`JS re-injected successfully in ${runtime}ms`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error compiling JS:", error);
|
console.log("Error compiling JS:", error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Compile tailwind to css and reload on changes
|
// Compile tailwind to css and reload on changes
|
||||||
browserSync.watch(["**/*.css", "**/*.php"], (event, file) => {
|
browserSync.watch(["**/*.css", "**/*.php"], (event, file) => {
|
||||||
if (event !== "change") return;
|
if (event !== "change") return;
|
||||||
|
|
||||||
tailwindToCSS();
|
tailwindToCSS();
|
||||||
browserSync.reload();
|
browserSync.reload();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -15,9 +15,10 @@ $copyright_text = getFieldValue( 'footer.copyright_text' ) ? getFieldValue( 'foo
|
|||||||
|
|
||||||
$copyright = str_replace( '%Y', gmdate( 'Y' ), $copyright_text );
|
$copyright = str_replace( '%Y', gmdate( 'Y' ), $copyright_text );
|
||||||
|
|
||||||
$locations = get_nav_menu_locations();
|
$locations = get_nav_menu_locations();
|
||||||
$footerMenu = get_term( $locations['footer_navigation'], 'nav_menu' );
|
$footerNav = ! empty( $locations['footer_navigation'] )
|
||||||
$footerNav = wp_get_nav_menu_items( $footerMenu->term_id );
|
? ( wp_get_nav_menu_items( (int) $locations['footer_navigation'] ) ? wp_get_nav_menu_items( (int) $locations['footer_navigation'] ) : array() )
|
||||||
|
: array();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class Enqueue {
|
|||||||
public function __construct() {
|
public function __construct() {
|
||||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqFEAssets' ) );
|
add_action( 'wp_enqueue_scripts', array( $this, 'enqFEAssets' ) );
|
||||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqBEAssets' ) );
|
add_action( 'admin_enqueue_scripts', array( $this, 'enqBEAssets' ) );
|
||||||
|
add_action( 'enqueue_block_editor_assets', array( $this, 'enqEditorAssets' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,8 +53,8 @@ class Enqueue {
|
|||||||
if ( file_exists( $theme_dir . $js_path ) ) {
|
if ( file_exists( $theme_dir . $js_path ) ) {
|
||||||
$version = filemtime( $theme_dir . $js_path );
|
$version = filemtime( $theme_dir . $js_path );
|
||||||
wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts.
|
wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts.
|
||||||
wp_enqueue_script_module( 'basicwp-theme', $theme_uri . $js_path, array(), $version, true );
|
wp_enqueue_script_module( 'basicwp-theme', $theme_uri . $js_path, array(), $version );
|
||||||
wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-theme' ), $version, true );
|
wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-theme' ), $version );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,15 +65,6 @@ class Enqueue {
|
|||||||
$theme_dir = get_stylesheet_directory();
|
$theme_dir = get_stylesheet_directory();
|
||||||
$theme_uri = get_stylesheet_directory_uri();
|
$theme_uri = get_stylesheet_directory_uri();
|
||||||
|
|
||||||
/**
|
|
||||||
* Editor CSS
|
|
||||||
*/
|
|
||||||
$editor_css_path = '/styles/backend/editor.css';
|
|
||||||
if ( file_exists( $theme_dir . $editor_css_path ) ) {
|
|
||||||
$version = filemtime( $theme_dir . $editor_css_path );
|
|
||||||
wp_enqueue_style( 'basicwp-editor', $theme_uri . $editor_css_path, array(), $version );
|
|
||||||
}
|
|
||||||
|
|
||||||
$font_ver = gmdate( 'U' );
|
$font_ver = gmdate( 'U' );
|
||||||
wp_enqueue_style( 'raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@100..900&display=swap', false, $font_ver );
|
wp_enqueue_style( 'raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@100..900&display=swap', false, $font_ver );
|
||||||
|
|
||||||
@@ -92,10 +84,28 @@ class Enqueue {
|
|||||||
if ( file_exists( $theme_dir . $admin_js_path ) ) {
|
if ( file_exists( $theme_dir . $admin_js_path ) ) {
|
||||||
$version = filemtime( $theme_dir . $admin_js_path );
|
$version = filemtime( $theme_dir . $admin_js_path );
|
||||||
wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts.
|
wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts.
|
||||||
wp_enqueue_script_module( 'basicwp-admin', $theme_uri . $admin_js_path, array(), $version, true );
|
wp_enqueue_script_module( 'basicwp-admin', $theme_uri . $admin_js_path, array(), $version );
|
||||||
wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-admin' ), $version, true );
|
wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-admin' ), $version );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enqueue block editor CSS (scoped to editor to avoid leaking into wp-admin UI).
|
||||||
|
*/
|
||||||
|
public function enqEditorAssets() {
|
||||||
|
$theme_dir = get_stylesheet_directory();
|
||||||
|
$theme_uri = get_stylesheet_directory_uri();
|
||||||
|
|
||||||
|
$editor_css_path = '/styles/backend/editor.css';
|
||||||
|
|
||||||
|
$font_ver = gmdate( 'U' );
|
||||||
|
wp_enqueue_style( 'raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@100..900&display=swap', false, $font_ver );
|
||||||
|
|
||||||
|
if ( file_exists( $theme_dir . $editor_css_path ) ) {
|
||||||
|
$version = filemtime( $theme_dir . $editor_css_path );
|
||||||
|
wp_enqueue_style( 'basicwp-editor', $theme_uri . $editor_css_path, array(), $version );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the Enqueue class.
|
// Initialize the Enqueue class.
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ function init() {
|
|||||||
wp_dequeue_style( 'core-block-styles' ); // Core block styles.
|
wp_dequeue_style( 'core-block-styles' ); // Core block styles.
|
||||||
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles', 1 );
|
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles', 1 );
|
||||||
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_classic_theme_styles', 1 );
|
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_classic_theme_styles', 1 );
|
||||||
remove_action( 'wp_head', 'wp_print_styles', 8 );
|
|
||||||
remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
|
remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
|
||||||
remove_action( 'wp_head', 'wp_generator' ); // WordPress version.
|
remove_action( 'wp_head', 'wp_generator' ); // WordPress version.
|
||||||
remove_action( 'wp_head', 'rsd_link' ); // RSD link.
|
remove_action( 'wp_head', 'rsd_link' ); // RSD link.
|
||||||
|
|||||||
80
package.json
80
package.json
@@ -1,42 +1,42 @@
|
|||||||
{
|
{
|
||||||
"name": "vdi-starter-v5",
|
"name": "vdi-starter-v5",
|
||||||
"version": "5.0",
|
"version": "5.0",
|
||||||
"description": "VDI-Starter-v5 is a minimal WordPress theme designed as a starting point for custom theme development. It focuses on modern development approaches with a lean architecture that avoids the overhead of theme frameworks.",
|
"description": "VDI-Starter-v5 is a minimal WordPress theme designed as a starting point for custom theme development. It focuses on modern development approaches with a lean architecture that avoids the overhead of theme frameworks.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npm run watch",
|
"start": "npm run watch",
|
||||||
"watch": "node bin/.watch.js",
|
"watch": "node bin/.watch.js",
|
||||||
"build": "npx @tailwindcss/cli -i ./styles/theme.css -o ./static/dist/theme.css --optimize"
|
"build": "./node_modules/.bin/tailwindcss -i ./styles/theme.css -o ./static/dist/theme.css --optimize"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/Vincent-Design-Inc/VDI-Starter-v5.git"
|
"url": "git+https://github.com/Vincent-Design-Inc/VDI-Starter-v5.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
"minimal",
|
"minimal",
|
||||||
"basic",
|
"basic",
|
||||||
"custom",
|
"custom",
|
||||||
"theme"
|
"theme"
|
||||||
],
|
],
|
||||||
"author": "Keith Solomon <keith@vincentdesign.ca>",
|
"author": "Keith Solomon <keith@vincentdesign.ca>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5/issues"
|
"url": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5#readme",
|
"homepage": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@axe-core/playwright": "^4.10.1",
|
"@axe-core/playwright": "^4.10.1",
|
||||||
"@playwright/test": "^1.52.0",
|
"@playwright/test": "^1.52.0",
|
||||||
"@types/node": "^22.15.2",
|
"@types/node": "^22.15.2",
|
||||||
"browser-sync": "^3.0.3",
|
"browser-sync": "^3.0.3",
|
||||||
"dotenv": "^16.4.7"
|
"dotenv": "^16.4.7"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/cli": "^4.0.13",
|
"tailwindcss": "^4.0.13",
|
||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/cli": "^4.0.13",
|
||||||
"glob": "^10.3.10",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"lodash": "^4.17.21",
|
"glob": "^10.3.10",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash": "^4.17.21",
|
||||||
"tailwindcss": "^4.0.13"
|
"lodash.debounce": "^4.0.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,2 @@
|
|||||||
/* Theme admin styles */
|
/* Light admin styles; avoid overriding core wp-admin UI */
|
||||||
|
|
||||||
@import "../../static/dist/theme.css";
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: 'Raleway', sans-serif;
|
|
||||||
|
|
||||||
#wpwrap {
|
|
||||||
@layer utilities {
|
|
||||||
table.fixed { table-layout: fixed; position: static; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#wpbody ul, ol, ul li, ol li { list-style-type: none; }
|
|
||||||
#adminmenu li ul, li ol { margin: 0; }
|
|
||||||
|
|||||||
@@ -2,9 +2,18 @@
|
|||||||
|
|
||||||
@import "../../static/dist/theme.css";
|
@import "../../static/dist/theme.css";
|
||||||
|
|
||||||
body { font-family: 'Raleway', sans-serif; }
|
body {
|
||||||
|
font-family: var(--font-sans);
|
||||||
|
|
||||||
|
h1, h2, h3,
|
||||||
|
h4, h5, h6 {
|
||||||
|
font-family: var(--font-headings);
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.wp-block-buttons .block-editor-block-list__layout {
|
.wp-block-buttons .block-editor-block-list__layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,24 @@
|
|||||||
* text-60px: 30px-80px, default: 60px
|
* text-60px: 30px-80px, default: 60px
|
||||||
* text-70px: 30px-76px, default: 70px
|
* text-70px: 30px-76px, default: 70px
|
||||||
* text-75px: 32px-80px, default: 75px
|
* text-75px: 32px-80px, default: 75px
|
||||||
|
*
|
||||||
|
* Font sizes at standard viewport widths:
|
||||||
|
* | 360px | 640px | 768px | 1024px | 1280px | 1440px | 1920px
|
||||||
|
* |-------|-------|-------|--------|--------|--------|-------
|
||||||
|
* text-14px | 12.00 | 12.36 | 12.52 | 12.85 | 13.18 | 13.38 | 14.00
|
||||||
|
* text-16px | 14.00 | 14.36 | 14.52 | 14.85 | 15.18 | 15.38 | 16.00
|
||||||
|
* text-18px | 14.00 | 14.72 | 15.05 | 15.70 | 16.36 | 16.77 | 18.00
|
||||||
|
* text-20px | 16.00 | 16.72 | 17.05 | 17.70 | 18.36 | 18.77 | 20.00
|
||||||
|
* text-22px | 17.60 | 18.36 | 18.75 | 19.47 | 20.19 | 20.65 | 22.00
|
||||||
|
* text-25px | 18.00 | 19.26 | 19.83 | 20.98 | 22.13 | 22.85 | 25.00
|
||||||
|
* text-30px | 18.96 | 20.89 | 21.85 | 23.66 | 25.47 | 26.60 | 30.00
|
||||||
|
* text-35px | 20.00 | 22.69 | 23.92 | 26.38 | 28.85 | 30.38 | 35.00
|
||||||
|
* text-38px | 22.40 | 24.85 | 26.48 | 29.04 | 31.60 | 33.20 | 38.00
|
||||||
|
* text-40px | 24.00 | 26.87 | 28.18 | 30.81 | 33.44 | 35.08 | 40.00
|
||||||
|
* text-45px | 25.60 | 29.22 | 30.67 | 33.86 | 37.04 | 39.03 | 45.00
|
||||||
|
* text-50px | 27.20 | 31.58 | 33.16 | 36.90 | 40.65 | 42.98 | 50.00
|
||||||
|
* text-70px | 30.40 | 37.01 | 40.76 | 47.26 | 53.75 | 57.82 | 70.00
|
||||||
|
* text-75px | 32.00 | 39.46 | 43.25 | 50.30 | 57.36 | 61.77 | 75.00
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@theme {
|
@theme {
|
||||||
@@ -26,20 +44,20 @@
|
|||||||
--line-height: 1.6;
|
--line-height: 1.6;
|
||||||
|
|
||||||
--text-base: 1rem;
|
--text-base: 1rem;
|
||||||
--text-14px: clamp(0.75rem, 0.7292vw, 1.7rem);
|
--text-14px: clamp(0.75rem, calc(0.7212rem + 0.1282vw), 0.875rem);
|
||||||
--text-16px: clamp(0.875rem, 0.8333vw, 1.8rem);
|
--text-16px: clamp(0.875rem, calc(0.8462rem + 0.1282vw), 1rem);
|
||||||
--text-18px: clamp(0.875rem, 0.9375vw, 1.9rem);
|
--text-18px: clamp(0.875rem, calc(0.8173rem + 0.2564vw), 1.125rem);
|
||||||
--text-20px: clamp(1rem, 1.0417vw, 2rem);
|
--text-20px: clamp(1rem, calc(0.9423rem + 0.2564vw), 1.25rem);
|
||||||
--text-22px: clamp(1.1rem, 1.15vw, 2.1rem);
|
--text-22px: clamp(1.1rem, calc(1.0365rem + 0.2821vw), 1.375rem);
|
||||||
--text-25px: clamp(1.125rem, 1.3021vw, 2.2rem);
|
--text-25px: clamp(1.125rem, calc(1.024rem + 0.4487vw), 1.5625rem);
|
||||||
--text-30px: clamp(1.185rem, 1.5625vw, 2.35rem);
|
--text-30px: clamp(1.185rem, calc(1.0258rem + 0.7077vw), 1.875rem);
|
||||||
--text-35px: clamp(1.25rem, 1.8229vw, 2.5rem);
|
--text-35px: clamp(1.25rem, calc(1.0337rem + 0.9615vw), 2.1875rem);
|
||||||
--text-38px: clamp(1.4rem, 1.9791vw, 3rem);
|
--text-38px: clamp(1.4rem, calc(1.175rem + 1vw), 2.375rem);
|
||||||
--text-40px: clamp(1.5rem, 2.0834vw, 3.5rem);
|
--text-40px: clamp(1.5rem, calc(1.2692rem + 1.0256vw), 2.5rem);
|
||||||
--text-45px: clamp(1.6rem, 2.3438vw, 4rem);
|
--text-45px: clamp(1.6rem, calc(1.3202rem + 1.2436vw), 2.8125rem);
|
||||||
--text-50px: clamp(1.7rem, 2.6042vw, 4.5rem);
|
--text-50px: clamp(1.7rem, calc(1.3712rem + 1.4615vw), 3.125rem);
|
||||||
--text-70px: clamp(1.9rem, 3.6458vw, 4.8rem);
|
--text-70px: clamp(1.9rem, calc(1.3288rem + 2.5385vw), 4.375rem);
|
||||||
--text-75px: clamp(2rem, 3.9063vw, 5rem);
|
--text-75px: clamp(2rem, calc(1.3798rem + 2.7564vw), 4.6875rem);
|
||||||
|
|
||||||
--h1: calc(var(--text-base) * 2.25);
|
--h1: calc(var(--text-base) * 2.25);
|
||||||
--h2: calc(var(--text-base) * 1.75);
|
--h2: calc(var(--text-base) * 1.75);
|
||||||
@@ -50,74 +68,76 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: black;
|
color: black;
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-sans);
|
||||||
font-size: var(--text-base);
|
font-size: var(--text-base);
|
||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
::selection { background: var(--color-warning); }
|
::selection { background: var(--color-warning); }
|
||||||
|
|
||||||
@layer components {
|
@layer components {
|
||||||
h1, h2, h3,
|
h1, h2, h3,
|
||||||
h4, h5, h6 {
|
h4, h5, h6 {
|
||||||
font-weight: 700;
|
font-family: var(--font-headings);
|
||||||
margin: 0 0 1rem;
|
font-weight: 700;
|
||||||
}
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
h1, .h1 {
|
h1, .h1 {
|
||||||
font-size: var(--h1);
|
font-size: var(--h1);
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2, .h2 {
|
h2, .h2 {
|
||||||
font-size: var(--h2);
|
font-size: var(--h2);
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3, .h3 {
|
h3, .h3 {
|
||||||
font-size: var(--h3);
|
font-size: var(--h3);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4, .h4 {
|
h4, .h4 {
|
||||||
font-size: var(--h4);
|
font-size: var(--h4);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
h5, .h5 { font-size: var(--h5); }
|
h5, .h5 { font-size: var(--h5); }
|
||||||
|
|
||||||
h6, .h6 { font-size: var(--h6); }
|
h6, .h6 { font-size: var(--h6); }
|
||||||
}
|
}
|
||||||
|
|
||||||
a, .link {
|
a, .link {
|
||||||
color: var(--color-bodylinks);
|
color: var(--color-bodylinks);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: color 200ms;
|
transition: color 200ms;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover { color: var(--color-primary); }
|
&:hover { color: var(--color-primary); }
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 a, .h1 a,
|
h1 a, .h1 a,
|
||||||
h2 a, .h2 a,
|
h2 a, .h2 a,
|
||||||
h3 a, .h3 a {
|
h3 a, .h3 a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
li ul, li ol { margin: 0 1rem; }
|
|
||||||
|
|
||||||
ul { list-style-type: disc; }
|
ul { list-style-type: disc; }
|
||||||
|
|
||||||
ol { list-style-type: decimal; }
|
ol { list-style-type: decimal; }
|
||||||
|
|
||||||
|
li ul, li ol { margin: 0 1rem; }
|
||||||
|
|
||||||
ol ol { list-style: lower-alpha; }
|
ol ol { list-style: lower-alpha; }
|
||||||
|
|
||||||
ol ol ol { list-style: lower-roman; }
|
ol ol ol { list-style: lower-roman; }
|
||||||
@@ -128,27 +148,27 @@ pre, code,
|
|||||||
samp, style { font-family: monospace; }
|
samp, style { font-family: monospace; }
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre code {
|
pre code {
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
@apply bg-black/30 px-[3px] py-[2px] font-mono text-black text-xs rounded-sm;
|
@apply bg-black/30 px-[3px] py-0.5 font-mono text-black text-xs rounded-sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
border: none;
|
border: none;
|
||||||
display: block;
|
display: block;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user