Skip to content

Instantly share code, notes, and snippets.

View chrislachance's full-sized avatar

Chris LaChance chrislachance

View GitHub Profile
@chrislachance
chrislachance / regex-Fullname.txt
Created September 2, 2021 19:39
Regex pattern for Full name with space checking
^[A-Z][a-z]+\s[a-zA-Z\s\.]+
Matches "Chris L", "Chris LaChance", and "Rico del Sola"
@chrislachance
chrislachance / regex-Date.txt
Created September 2, 2021 19:38
RegEx pattern - Date
^\d{2}\/\d{2}\/\d{4}$
MM/DD/YYYY
@chrislachance
chrislachance / pcds-form-input_example.html
Last active August 11, 2021 19:14
Pega Cosmos Design System form input code example
<form action="#" class="form-entry">
<input id="field-fullname-input" type="text" aria-describedby="field-fullname-info" required>
<label for="field-fullname-input">Your full name</label>
<div class="input-info" id="field-fullname-info">Please include your first and last name.</div>
</form>
@chrislachance
chrislachance / base.css
Created May 29, 2021 16:12
My starter CSS file.
/* Merging Modern-Normalize and Sanitize, with my own magic sprinkles & reference assets */
*,::before,::after{background-repeat:no-repeat;box-sizing:border-box;color:inherit;cursor:inherit;font:inherit;hyphens:auto;line-height:inherit;margin:0;text-decoration:inherit;vertical-align:inherit;word-break:break-word;scroll-behavior:smooth}
::before,::after{text-decoration:inherit}
:root,html{-moz-tab-size:4;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;cursor:default;overflow-wrap:break-word;tab-size:4;font:-apple-system-body}
@supports (font:-apple-system-body) and (not(-webkit-touch-callout:default)){:root{font-size:16px}}
body{block-size:-moz-available;block-size:-webkit-fill-available;block-size:stretch;margin:0}
:where(h1,h2,h3,h4)>a{color:inherit}
abbr[title]{text-decoration:underline dotted}
b,strong{font-weight:700}
@chrislachance
chrislachance / base.scss
Last active August 26, 2020 13:14
SCSS: Base
//// VARS
// Spacing
$spacing: .5; //REM value
$sQuarter: $spacing * .25rem;
$sThird: $spacing * .33rem;
$sHalf: $spacing * .5rem;
$s1: $spacing * 1rem;
$s2: $spacing * 2rem;
$s3: $spacing * 3rem;
$s4: $spacing * 4rem;
@chrislachance
chrislachance / base.html
Last active August 26, 2020 12:18
HTML: Base
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!--link rel="stylesheet" href="normalize.css"-->
@chrislachance
chrislachance / Flex fix
Last active August 26, 2020 12:12
CSS: Flex fix
flex: 1 0 auto;