From b471e32ecbf7a17bd17f3ea286c647561d94ef6e Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 19 Sep 2025 22:49:46 +0100 Subject: [PATCH] IP regex and validator --- src/lib/components/global/Icon.svelte | 15 +- src/lib/components/tools/IPConverter.svelte | 17 +- src/lib/components/tools/IPDistance.svelte | 941 ++++--- .../components/tools/IPRegexGenerator.svelte | 2219 ++++++++++------- src/lib/components/tools/NthIP.svelte | 1139 +++++---- src/lib/components/tools/RandomIP.svelte | 1072 ++++---- src/lib/content/ip-address-validation.ts | 146 ++ src/routes/+layout.svelte | 20 +- src/styles/base.scss | 1 + src/styles/components.scss | 12 +- src/styles/variables.scss | 3 +- 11 files changed, 3242 insertions(+), 2343 deletions(-) create mode 100644 src/lib/content/ip-address-validation.ts diff --git a/src/lib/components/global/Icon.svelte b/src/lib/components/global/Icon.svelte index e295ec7..0831de6 100644 --- a/src/lib/components/global/Icon.svelte +++ b/src/lib/components/global/Icon.svelte @@ -8,9 +8,10 @@ name: IconName; size?: 'xs' | 'sm' | 'md' | 'lg'; animate?: 'spin' | 'pulse' | 'pulse-once' | 'bounce' | 'fade' | null; + rotate?: 0 | 90 | 180 | 270; } - let { name, size = 'md', animate = null }: Props = $props(); + let { name, size = 'md', animate = null, rotate = 0 }: Props = $props(); const sizeClasses = { xs: 'w-2 h-2', @@ -258,6 +259,8 @@ 'email-dmarc': ``, 'rdap-ip': ``, 'rdap-asn': ``, + // Brands + 'regexr': ``, }; type IconName = keyof typeof iconMap; @@ -275,7 +278,7 @@ const svgContent = $derived(getSvgContent(name)); -
+
{#if svgContent} {@html svgContent} {:else} @@ -312,6 +315,14 @@ .w-8 { width: 1.75rem; height: 1.75rem; } .h-8 { height: 1.75rem; } + .rotate { + transition: transform 0.3s ease; + &.rotate-0 { transform: rotate(0deg); } + &.rotate-90 { transform: rotate(90deg); } + &.rotate-180 { transform: rotate(180deg); } + &.rotate-270 { transform: rotate(270deg); } + } + .animate-spin { animation: spin 1s linear infinite; } diff --git a/src/lib/components/tools/IPConverter.svelte b/src/lib/components/tools/IPConverter.svelte index b42d32f..224fbd6 100644 --- a/src/lib/components/tools/IPConverter.svelte +++ b/src/lib/components/tools/IPConverter.svelte @@ -3,8 +3,7 @@ import { validateIPv4 } from '$lib/utils/ip-validation.js'; import IPInput from './IPInput.svelte'; import Tooltip from '$lib/components/global/Tooltip.svelte'; - import SvgIcon from '$lib/components/global/SvgIcon.svelte'; - import Icon from '../global/Icon.svelte'; + import Icon from '../global/Icon.svelte'; let ipAddress = $state('192.168.1.1'); let formats = $state({ @@ -483,7 +482,7 @@
-

🔧 Network Administration

+

Network Administration

  • Dotted Decimal: Daily configuration and documentation
  • Binary: Subnet calculations and VLSM planning
  • @@ -492,7 +491,7 @@
-

💻 Programming & Development

+

Programming & Development

  • Decimal: Database storage and IP range operations
  • Hexadecimal: Low-level socket programming
  • @@ -501,7 +500,7 @@
-

🔍 Troubleshooting & Analysis

+

Troubleshooting & Analysis

  • Binary: Understanding subnet boundaries
  • Hexadecimal: Reading network packet captures
  • @@ -515,6 +514,12 @@ diff --git a/src/lib/components/tools/IPRegexGenerator.svelte b/src/lib/components/tools/IPRegexGenerator.svelte index 09dd5cd..11cf8de 100644 --- a/src/lib/components/tools/IPRegexGenerator.svelte +++ b/src/lib/components/tools/IPRegexGenerator.svelte @@ -1,16 +1,27 @@
    @@ -287,14 +387,14 @@
    + {/if} - + Test on RegexR
    @@ -509,19 +508,92 @@
    -
    -
    - Regular Expression - + {#if isEditingRegex} + +
    +
    + Edit Regular Expression +
    + + +
    +
    + +
    +
    + + +
    + +
    + + +
    +
    + + {#if regexValidation} + {#if regexValidation.ok} +
    + + Valid regex pattern +
    + {:else} +
    + + {regexValidation.error} +
    + {/if} + {/if} + +
    + Preview: + /{editablePattern || '...'}/{editableFlags} +
    - /{result.pattern}/{result.flags} -
    + {:else} + +
    +
    + Regular Expression + +
    + /{result.pattern}/{result.flags} +
    + {/if} {#if result.flags}
    @@ -541,80 +613,148 @@
    - -
    -

    Implementation Examples

    -
    -
    -
    - - JavaScript - -
    - const ipRegex = /{result.pattern}/{result.flags};
    const isValid = ipRegex.test(ipAddress);
    -
    - -
    -
    - - Python - -
    - import re
    pattern = r'{result.pattern}'
    is_valid = bool(re.match(pattern, ip_address{result.flags ? ', re.IGNORECASE' : ''}))
    -
    - -
    -
    - - PHP - -
    - $pattern = '/{result.pattern}/{result.flags}';
    $isValid = preg_match($pattern, $ipAddress);
    -
    -
    -
    -
    -

    Test Cases

    +
    +

    Test Cases

    + {#if !isEditingTestCases} + + {:else} +
    + + +
    + {/if} +
    +
    - Should Match ({result.testCases.valid.length}) + Should Match ({isEditingTestCases ? editableValidCases.length : result.testCases.valid.length})
    -
    - {#each result.testCases.valid as testCase} - {testCase} - {/each} -
    + + {#if isEditingTestCases} +
    +
    + e.key === 'Enter' && addValidTestCase()} + /> + +
    +
    + {#each editableValidCases as testCase, index} +
    + {testCase} + +
    + {/each} +
    +
    + {:else} +
    + {#each testCaseResults.valid as testResult} +
    + {testResult.text} + + {testResult.matches ? 'PASS' : 'FAIL'} + +
    + {/each} +
    + {/if}
    - Should Not Match ({result.testCases.invalid.length}) + Should Not Match ({isEditingTestCases ? editableInvalidCases.length : result.testCases.invalid.length})
    -
    - {#each result.testCases.invalid as testCase} - {testCase} - {/each} -
    + + {#if isEditingTestCases} +
    +
    + e.key === 'Enter' && addInvalidTestCase()} + /> + +
    +
    + {#each editableInvalidCases as testCase, index} +
    + {testCase} + +
    + {/each} +
    +
    + {:else} +
    + {#each testCaseResults.invalid as testResult} +
    + {testResult.text} + + {!testResult.matches ? 'PASS' : 'FAIL'} + +
    + {/each} +
    + {/if}
    @@ -623,7 +763,7 @@
    {#if result.tradeoffs.length > 0} -
    +

    Trade-offs @@ -637,7 +777,7 @@ {/if} {#if result.limitations.length > 0} -
    +

    Limitations @@ -652,7 +792,7 @@

    -
    +

    Recommendations @@ -677,6 +817,51 @@

    + + +
    +

    Implementation Examples

    +
    + {#each getLanguageExamples(result.pattern, result.flags) as example} +
    + + +
    +
    + +
    {example.code}
    +
    + {#if example.note} +

    {example.note}

    + {/if} +
    +
    + {/each} +
    +
    {/if}

    @@ -684,83 +869,74 @@ diff --git a/src/lib/components/tools/NthIP.svelte b/src/lib/components/tools/NthIP.svelte index 8dad67d..f984646 100644 --- a/src/lib/components/tools/NthIP.svelte +++ b/src/lib/components/tools/NthIP.svelte @@ -1,28 +1,77 @@
    -

    Nth IP Calculator

    -

    Resolve the IP address at a specific index within networks and ranges with optional offset

    +

    Nth IP Calculator

    +

    Resolve the IP address at a specific index within networks and ranges with optional global offset.

    -
    -
    - - -
    - Formats: network @ index, network [index], network index, or network#index. Optional offset: + number + +
    +
    + + +

    Quick Examples

    +
    +
    + {#each examples as example, i} + + {/each}
    -
    + +
    -
    -
    - - -
    - Add this value to all index calculations (0-based indexing) + +
    +
    +

    Network Configuration

    +
    +
    +
    +
    + + +
    + Formats: network @ index, network [index], network index, or network#index. Optional offset: + number +
    +
    + +
    +
    + + +
    + Add this value to all index calculations (0-based indexing) +
    +
    {#if isLoading} -
    - - Calculating IPs... +
    +
    +
    + + Calculating IPs... +
    +
    {/if} {#if result}
    {#if result.errors.length > 0} -
    -

    Errors

    - {#each result.errors as error} -
    {error}
    - {/each} +
    +
    +
    + +
    + Calculation Errors + {#each result.errors as error} +

    {error}

    + {/each} +
    +
    +
    {/if} {#if result.calculations.length > 0} -
    -

    Calculation Summary

    -
    -
    - {result.summary.totalCalculations} - Total Calculations -
    -
    - {result.summary.validCalculations} - Valid -
    -
    - {result.summary.invalidCalculations} - Invalid -
    -
    - {result.summary.outOfBoundsCalculations} - Out of Bounds +
    +
    +

    Calculation Summary

    + +
    +
    +
    +
    +
    Total
    +
    {result.summary.totalCalculations}
    +
    +
    +
    Valid
    +
    {result.summary.validCalculations}
    +
    +
    +
    Invalid
    +
    0}>{result.summary.invalidCalculations}
    +
    +
    +
    Out of Bounds
    +
    0}>{result.summary.outOfBoundsCalculations}
    +
    -
    -
    +
    +

    IP Calculations

    - -
    +
    -
    - {#each result.calculations as calculation} -
    -
    -
    - {calculation.input} -
    - {calculation.inputType.toUpperCase()} - IPv{calculation.version} -
    -
    - -
    - {#if calculation.isValid && calculation.isInBounds} - - {:else if calculation.isValid && !calculation.isInBounds} - - {:else} - - {/if} -
    -
    - - {#if calculation.isValid} -
    -
    -
    - Result IP: -
    - - {#if !calculation.isInBounds} -
    - - Index out of bounds +
    + {calculation.inputType.toUpperCase()} + IPv{calculation.version} +
    +
    + +
    + {#if calculation.isValid && calculation.isInBounds} + + + + {:else if calculation.isValid && !calculation.isInBounds} + + + + {:else} + + + + {/if} +
    +
    + + {#if calculation.isValid} +
    +
    +
    + Result IP: +
    + {calculation.resultIP} + +
    +
    + + {#if !calculation.isInBounds} +
    + + Index out of bounds +
    + {/if} +
    + +
    +
    +

    Calculation Details

    +
    +
    +
    +
    Network
    +
    + {calculation.network} + +
    +
    + +
    +
    Total Addresses
    +
    {calculation.totalAddresses}
    +
    + +
    +
    Index
    +
    {calculation.index}
    +
    + +
    +
    Offset
    +
    {calculation.offset}
    +
    +
    +
    + + {#if calculation.details} +
    +
    +

    Network Details

    +
    +
    +
    +
    +
    Start
    +
    + {calculation.details.networkStart} + +
    +
    + +
    +
    End
    +
    + {calculation.details.networkEnd} + +
    +
    + +
    +
    Actual Index
    +
    {calculation.details.actualIndex}
    +
    + +
    +
    Max Index
    +
    {calculation.details.maxIndex}
    +
    +
    +
    {/if}
    - -
    -
    -
    - Network: - -
    - -
    - Total Addresses: - {calculation.totalAddresses} -
    - -
    - Index: - {calculation.index} -
    - -
    - Offset: - {calculation.offset} -
    -
    + {:else} +
    + + {calculation.error}
    - - {#if calculation.details} -
    -

    Network Details

    -
    -
    - Start: - -
    - -
    - End: - -
    - -
    - Actual Index: - {calculation.details.actualIndex} -
    - -
    - Max Index: - {calculation.details.maxIndex} -
    -
    -
    - {/if} -
    - {:else} -
    - - {calculation.error} -
    - {/if} -
    - {/each} + {/if} +
    + {/each} +
    {/if} @@ -279,100 +468,97 @@ {/if}
    - diff --git a/src/lib/components/tools/RandomIP.svelte b/src/lib/components/tools/RandomIP.svelte index 8d20ddb..6210705 100644 --- a/src/lib/components/tools/RandomIP.svelte +++ b/src/lib/components/tools/RandomIP.svelte @@ -1,13 +1,45 @@ -
    -
    -

    Random IP Generator

    +
    +
    +

    Random IP Generator

    Generate random IP addresses from networks and ranges with uniqueness control and seeded randomness

    -
    +
    -
    -
    - - -
    - Formats: network x count, network * count, network count, network#count, network[count] -
    -
    - -
    -
    - - -
    - Number of IPs to generate when count is not specified -
    -
    - -
    - -
    - Ensure all generated IPs are unique within each network -
    -
    - -
    - -
    - - + {/each} +
    + +
    + +
    +

    Network Configuration

    +
    +
    +
    + + +
    + Formats: network x count, network * count, network count, network#count, network[count] +
    -
    - Use the same seed for reproducible random results +
    + +
    +
    + + +
    + +
    + +
    + +
    + +
    + + +
    @@ -166,82 +247,126 @@ {/if} {#if result} -
    +
    {#if result.errors.length > 0} -
    -

    Errors

    - {#each result.errors as error} -
    {error}
    - {/each} +
    +
    +

    Errors

    +
    +
    + {#each result.errors as error} +
    + + {error} +
    + {/each} +
    {/if} {#if result.generations.length > 0} -
    -

    Generation Summary

    -
    -
    - {result.summary.totalNetworks} - Total Networks -
    -
    - {result.summary.validNetworks} - Valid -
    -
    - {result.summary.invalidNetworks} - Invalid -
    -
    - {result.summary.totalIPsGenerated} - Total IPs -
    -
    - {result.summary.uniqueIPsGenerated} - Unique IPs +
    +
    +

    Generation Summary

    + +
    +
    +
    +
    +
    Total Networks
    +
    {result.summary.totalNetworks}
    +
    +
    +
    Valid
    +
    {result.summary.validNetworks}
    +
    +
    +
    Invalid
    +
    {result.summary.invalidNetworks}
    +
    +
    +
    Total IPs
    +
    {result.summary.totalIPsGenerated}
    +
    +
    +
    Unique IPs
    +
    {result.summary.uniqueIPsGenerated}
    +
    -
    -
    +
    +

    All Generated IPs ({result.allGeneratedIPs.length})

    - - - -
    - - {#if result.allGeneratedIPs.length > 0} -
    - {#each result.allGeneratedIPs as ip} - - {/each} -
    - {/if} +
    + {#if result.allGeneratedIPs.length > 0} +
    + {#each result.allGeneratedIPs as ip, index} + + {/each} +
    + {/if} +

    Network Generations

    - {#each result.generations as generation} + {#each result.generations as generation, index}
    -
    +
    {generation.network}
    @@ -315,363 +440,220 @@
    {/if} - {#if generation.generatedIPs.length > 0} -
    -

    Generated IPs

    -
    - {#each generation.generatedIPs as ip} - - {/each} + {#if generation.generatedIPs.length > 0} +
    +
    +

    Generated IPs ({generation.generatedIPs.length})

    +
    +
    + {#each generation.generatedIPs as ip, ipIndex} + + {/each} +
    -
    - {/if} -
    - {:else} -
    - - {generation.error} -
    - {/if} -
    - {/each} + {/if} +
    + {:else} +
    + + {generation.error} +
    + {/if} +
    + {/each} +
    -
    {/if}
    {/if}
    - diff --git a/src/lib/content/ip-address-validation.ts b/src/lib/content/ip-address-validation.ts new file mode 100644 index 0000000..b3f87e0 --- /dev/null +++ b/src/lib/content/ip-address-validation.ts @@ -0,0 +1,146 @@ +export const ipAddressValidationContent = { + title: "IP Address Format & RegEx Validation", + description: "Understanding IPv4 and IPv6 address formats and how to validate them properly using regular expressions.", + + sections: { + overview: { + title: "Understanding IP Address Formats", + content: `IP addresses come in two versions: IPv4 (32-bit) and IPv6 (128-bit). Each has specific formatting rules that programmers need to understand for proper validation. + +The key to validation is understanding the structure, not just pattern matching. RegEx can help with basic format checking, but proper IP validation often requires additional logic.` + }, + + ipv4: { + title: "IPv4 Address Format", + content: `IPv4 addresses consist of four decimal numbers (0-255) separated by dots. + +**Structure:** X.X.X.X where each X is 0-255 +**Examples:** 192.168.1.1, 10.0.0.1, 127.0.0.1 + +**Key Rules:** +• Each octet ranges from 0 to 255 +• Leading zeros are typically not allowed (001.002.003.004) +• All four octets are required + +**Common Validation Mistakes:** +• Allowing values > 255 (like 256.1.1.1) +• Missing boundary checks +• Not handling edge cases like 0.0.0.0` + }, + + ipv6: { + title: "IPv6 Address Format", + content: `IPv6 addresses are 128-bit addresses written as eight groups of four hexadecimal digits, separated by colons. + +**Full Format:** 2001:0db8:85a3:0000:0000:8a2e:0370:7334 +**Compressed:** 2001:db8:85a3::8a2e:370:7334 (:: replaces consecutive zeros) + +**Key Rules:** +• Eight groups of 1-4 hex digits (0-9, a-f, A-F) +• Leading zeros can be omitted in each group +• Consecutive zero groups can be replaced with :: (only once per address) +• Case insensitive + +**Special Cases:** +• :: (all zeros address) +• ::1 (loopback) +• IPv4-mapped: ::ffff:192.168.1.1` + }, + + regexValidation: { + title: "RegEx Validation Approach", + content: `Regular expressions can handle basic format validation, but IP validation has nuances that make pure RegEx challenging. + +**IPv4 RegEx Challenges:** +• Simple patterns like \\d+\\.\\d+\\.\\d+\\.\\d+ don't check ranges +• Proper range validation (0-255) requires complex patterns +• Leading zero handling varies by use case + +**IPv6 RegEx Challenges:** +• Multiple valid representations of the same address +• Compression rules (:: usage) +• Mixed IPv4/IPv6 notation support + +**Best Practice:** +Use RegEx for initial format checking, then validate with programming logic for range checks and special cases. Most languages have built-in IP parsing functions that handle edge cases correctly.` + }, + + practicalTips: { + title: "Practical Validation Tips", + content: `**For Production Code:** +1. Use language built-ins (inet_aton, IPAddress.parse, etc.) +2. RegEx for quick format checks only +3. Always validate ranges programmatically +4. Consider your use case (strict vs lenient parsing) + +**For Learning/Testing:** +1. Start with basic patterns +2. Add complexity gradually +3. Test edge cases thoroughly +4. Compare with known-good implementations + +**Common Gotchas:** +• 192.168.1.01 (leading zeros) +• 192.168.1 (missing octets) +• 192.168.1.1.1 (extra octets) +• Case sensitivity in IPv6 +• Multiple :: in IPv6` + } + }, + + examples: { + ipv4Basic: { + title: "Basic IPv4 Pattern", + pattern: "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$", + description: "Matches basic dot-decimal format, but doesn't validate ranges", + matches: ["192.168.1.1", "10.0.0.1"], + fails: ["192.168.1", "192.168.1.1.1"], + limitation: "Allows invalid ranges like 999.999.999.999" + }, + + ipv4Proper: { + title: "Range-Validated IPv4", + pattern: "^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$", + description: "Validates each octet is 0-255", + matches: ["192.168.1.1", "255.255.255.255", "0.0.0.0"], + fails: ["256.1.1.1", "192.168.1", "192.168.01.1"], + limitation: "Complex and hard to maintain" + }, + + ipv6Basic: { + title: "Basic IPv6 Pattern", + pattern: "^[0-9a-fA-F:]+$", + description: "Very basic check for hex digits and colons", + matches: ["2001:db8::1", "::1"], + fails: ["192.168.1.1", "hello"], + limitation: "Doesn't validate structure or compression rules" + } + }, + + recommendations: [ + { + icon: "code", + title: "Use Built-in Functions", + description: "Most languages have reliable IP parsing libraries. Use them instead of rolling your own RegEx.", + color: "var(--color-success)" + }, + { + icon: "test", + title: "Test Edge Cases", + description: "Test boundary values, malformed inputs, and different valid representations.", + color: "var(--color-info)" + }, + { + icon: "performance", + title: "Consider Performance", + description: "Complex RegEx patterns can be slow. Profile your validation code with realistic data.", + color: "var(--color-warning)" + }, + { + icon: "security", + title: "Validate Context", + description: "Consider what you're doing with the IP. Some contexts require stricter validation than others.", + color: "var(--color-primary)" + } + ] +}; \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 73ff0ca..d9aaba9 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -5,19 +5,23 @@ import '../styles/components.scss'; import '../styles/ref-pages.scss'; import '../styles/diagnostics-pages.scss'; - import favicon from '$lib/assets/favicon.svg'; + import '../styles/pages.scss'; + import favicon from '$lib/assets/favicon.svg'; import Header from '$lib/components/furniture/Header.svelte'; import SubHeader from '$lib/components/furniture/SubHeader.svelte'; import Footer from '$lib/components/furniture/Footer.svelte'; + + let { data, children } = $props(); // Gets data from the server load function - let { data, children } = $props(); + let darkMode = $state(true); // Stores the theme mode - import '../styles/pages.scss'; - - let darkMode = $state(true); + onMount(() => { + initializeTheme(); + }); + /* Reads and applies user's theme from localstorage on initial load */ function initializeTheme() { if (typeof window === 'undefined') return; const saved = localStorage.getItem('theme'); @@ -27,6 +31,7 @@ } } + /* Toggles between dark and light themes, saving preference to localstorage */ function toggleTheme() { darkMode = !darkMode; if (typeof window !== 'undefined') { @@ -39,10 +44,7 @@ } } - onMount(() => { - initializeTheme(); - }); - + /* Uses the server-generated breadcrumb data, to build a JSON-LD breadcrumb object */ function jsonLdTag(data: unknown, type = 'application/ld+json', nonce?: string) { if (!data) return ''; const json = JSON.stringify(data) diff --git a/src/styles/base.scss b/src/styles/base.scss index 1eb0e83..180e1aa 100644 --- a/src/styles/base.scss +++ b/src/styles/base.scss @@ -1,4 +1,5 @@ @import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;600;700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap'); /* Reset */ *, *::before, *::after { diff --git a/src/styles/components.scss b/src/styles/components.scss index 51d75a8..e7f450d 100644 --- a/src/styles/components.scss +++ b/src/styles/components.scss @@ -308,6 +308,8 @@ hr { display: flex; align-items: center; gap: var(--spacing-sm); + min-width: 0; + flex: 1; } .ip-value, .binary-value { @@ -316,12 +318,16 @@ hr { font-weight: 500; padding: var(--spacing-xs) var(--spacing-sm); border-radius: var(--radius-sm); - + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 100%; + &.success { color: var(--color-success-light); background-color: rgba(35, 134, 54, 0.1); } - + &.error { color: var(--color-error-light); background-color: rgba(218, 54, 51, 0.1); @@ -365,7 +371,7 @@ hr { // Checkbox styles .checkbox-label { display: flex; - align-items: canter; + align-items: center; gap: var(--spacing-sm); cursor: pointer; diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 56b05f5..4dbf5d7 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -48,6 +48,7 @@ --radius-lg: 8px; /* Spacing */ + --spacing-2xs: 0.125rem; --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; @@ -56,7 +57,7 @@ --spacing-2xl: 3rem; /* Font */ - --font-mono: 'Roboto Mono', 'Monaco', 'Menlo', 'Consolas', monospace; + --font-mono: 'Noto Sans Mono', 'Roboto Mono', 'Monaco', 'Menlo', 'Consolas', monospace; --font-size-2xs: 0.6rem; --font-size-xs: 0.75rem; --font-size-sm: 0.875rem;