6 Commits
1.0.3 ... 1.1.2

Author SHA1 Message Date
715d686171 updated anchor fix to include pointer cursor
All checks were successful
Publish Library / Build NPM Project (push) Successful in 12s
Publish Library / Tag Version (push) Successful in 6s
Publish Library / Publish CDN & Docs (push) Successful in 19s
2024-11-29 20:44:22 -05:00
e98ed586f5 Fixed font-family inheritance
Some checks failed
Publish Library / Build NPM Project (push) Successful in 11s
Publish Library / Tag Version (push) Successful in 5s
Publish Library / Publish CDN & Docs (push) Failing after 14s
2024-11-23 21:59:09 -05:00
c046b16b69 Opt out of fix syntax
All checks were successful
Publish Library / Build NPM Project (push) Successful in 11s
Publish Library / Tag Version (push) Successful in 5s
Publish Library / Publish CDN & Docs (push) Successful in 17s
2024-11-23 21:43:26 -05:00
344585e6dc Fixed some of the fixes
All checks were successful
Publish Library / Publish CDN & Docs (push) Successful in 20s
Publish Library / Tag Version (push) Successful in 6s
Publish Library / Build NPM Project (push) Successful in 17s
2024-11-23 21:39:26 -05:00
0ec350aae7 Fixed colors
All checks were successful
Publish Library / Build NPM Project (push) Successful in 11s
Publish Library / Tag Version (push) Successful in 5s
Publish Library / Publish CDN & Docs (push) Successful in 19s
2024-11-19 20:36:06 -05:00
00f290c861 Updated styles & docs
All checks were successful
Publish Library / Tag Version (push) Successful in 12s
Publish Library / Build NPM Project (push) Successful in 20s
Publish Library / Publish CDN & Docs (push) Successful in 32s
2024-11-19 19:32:46 -05:00
4 changed files with 63 additions and 59 deletions

View File

@ -13,6 +13,22 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<link href="./dist/css-utils.css" rel="stylesheet">
<style>
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-thumb {
width: 6px;
height: 6px;
margin: 0 1px;
border-radius: 3px;
background: #777;
cursor: pointer;
}
::-webkit-scrollbar-corner {
background: rgba(0,0,0,0);
}
* {
font-family: Roboto, sans-serif !important;
scroll-behavior: smooth;
@ -34,11 +50,14 @@
}
.animate-example.animated {
left: 110px;
background: var(--theme-accent);
transform: rotate(180deg);
opacity: 25%;
}
.animate-example.animated.animate,
.animate-example.animated.animate-pos {
left: 110px;
}
.box {
width: 20px;
@ -50,6 +69,7 @@
display: inline-block;
padding: 5px;
background: #f3f3f3;
word-break: break-word;
}
</style>
@ -58,7 +78,7 @@
<script>hljs.highlightAll();</script>
</head>
<body class="theme-light p-3 flex-r justify-center">
<body class="theme-light p-4 flex-r justify-center">
<div class="clamp flex-c z-1">
<div id="top" class="flex-grow-1 bg-clear shadow p-3">
<h1 class="mb-0">@ztimson/css-utils</h1>
@ -672,29 +692,31 @@ $sizes: ('auto': auto, 0: 0, 1: 0.25rem, 2: 0.5rem, 3: 1rem, 4: 1.5rem, 5: 2.5re
</div>
</div>
<div class="mt-4 flex-grow-1 bg-clear shadow p-3">
<h3 id="overflow">Overflow</h3>
<div class="inline-code">.overflow-[x|y]-[auto|hidden|scroll|visible]</div>
<br><br>
<div class="flex-r">
<div class="b-1 m-2 overflow-auto" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-auto</span>
<div class="mt-4 flex-grow-1 bg-clear shadow">
<div class="overflow-hidden p-3">
<h3 id="overflow">Overflow</h3>
<div class="inline-code">.overflow-[x|y]-[auto|hidden|scroll|visible]</div>
<br><br>
<div class="flex-r">
<div class="b-1 m-2 overflow-auto" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-auto</span>
</div>
</div>
</div>
<div class="b-1 m-2 overflow-hidden" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-hidden</span>
<div class="b-1 m-2 overflow-hidden" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-hidden</span>
</div>
</div>
</div>
<div class="b-1 m-2 overflow-scroll" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-scroll</span>
<div class="b-1 m-2 overflow-scroll" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-scroll</span>
</div>
</div>
</div>
<div class="b-1 m-2 overflow-visible" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-visible</span>
<div class="b-1 m-2 overflow-visible" style="width: 150px; height: 150px;">
<div style="width: 300px; height: 300px;" class="pos-rel">
<span class="pos-abs" style="left: 50%; top: 25%; transform: translate(-50%, -50%)">.overflow-visible</span>
</div>
</div>
</div>
</div>
@ -938,10 +960,7 @@ $sizes: ('auto': auto, 0: 0, 1: 0.25rem, 2: 0.5rem, 3: 1rem, 4: 1.5rem, 5: 2.5re
<div class="w-100 p-2"></div>
</div>
<div id="toc" class="flex-r shadow bg-clear z-5 pos-fix animate b-1" style="right: 0; top: 50px; transform: translateX(calc(100% - 26px))">
<div id="toc-toggle" class="curs-hover b-0 be-1 px-1 py-3 bg-backdrop" style="writing-mode: vertical-rl">
Table of Contents
</div>
<div id="toc" class="flex-r shadow bg-clear z-5 pos-fix animate b-1" style="left: 0; top: 25px; transform: translateX(calc(-100% + 26px))">
<div class="p-3 overflow-y-auto" style="max-height: 50vh;">
<ul class="p-0">
<li>
@ -983,13 +1002,16 @@ $sizes: ('auto': auto, 0: 0, 1: 0.25rem, 2: 0.5rem, 3: 1rem, 4: 1.5rem, 5: 2.5re
</li>
</ul>
</div>
<div id="toc-toggle" class="curs-hover b-0 be-1 px-1 py-3 bg-primary fg-white" style="writing-mode: vertical-rl">
Table of Contents
</div>
</div>
<script>
let open = false;
const toc = document.querySelector('#toc')
document.querySelector('#toc-toggle').onclick = () => {
if(open) toc.style.transform = 'translateX(calc(100% - 26px))';
if(open) toc.style.transform = 'translateX(calc(-100% + 26px))';
else toc.style.transform = 'translateX(0)';
open = !open;
}

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@ztimson/css-utils",
"version": "1.0.3",
"version": "1.0.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@ztimson/css-utils",
"version": "1.0.3",
"version": "1.0.5",
"license": "MIT",
"devDependencies": {
"sass": "^1.80.6"

View File

@ -1,6 +1,6 @@
{
"name": "@ztimson/css-utils",
"version": "1.0.3",
"version": "1.1.2",
"description": "CSS Utility Classes",
"readme": "README.md",
"scripts": {

View File

@ -47,30 +47,22 @@ $divisible: (0, 10, 20, 25, 30, 33, 34, 40, 50, 60, 66, 70, 75, 80, 90, 100);
// Optional opinionated styling to clean up CSS defaults
.fix-anchor, .fix {
.fix-anchor, .fix:not(.no-anchor-fix) {
a, a:not([href]) {
color: var(--theme-primary);
&:not(:hover) { text-decoration: none; }
&:hover { text-decoration: underline; }
cursor: pointer;
}
}
.fix-button, .fix {
.fix-button, .fix:not(.no-button-fix) {
button:not(:disabled) {
cursor: pointer;
}
}
.fix-code code, code.fix {
display: block;
white-space: pre;
font-family: monospace;
background: rgb(30, 30, 30);
color: #00cb00;
overflow: auto;
}
.fix-dom, .fix {
.fix-dom, .fix:not(.no-dom-fix) {
&, html, body {
height: 100%;
width: 100%;
@ -81,29 +73,21 @@ $divisible: (0, 10, 20, 25, 30, 33, 34, 40, 50, 60, 66, 70, 75, 80, 90, 100);
background-color: var(--theme-backdrop);
}
hr {
border-bottom: 1px solid black;
width: 100%;
opacity: 50%;
}
* { box-sizing: border-box; }
}
.fix-focus, .fix {
.fix-focus, .fix:not(.no-focus-fix) {
* {
outline: none !important;
box-shadow: none !important;
outline: inherit;
}
}
.fix-font, .fix {
* { font-family: var(--theme-font), sans-serif; }
.fix-font, .fix:not(.no-font-fix) {
color: var(--theme-text);
font-family: var(--theme-font), sans-serif;
p, input, select, textarea, button { font-size: 1rem; }
span { font-size: inherit; }
h1, h2, h3, h4, h5, h6, p {
margin-top: 0;
margin-bottom: 0.5rem;
}
h1, h2, h3, h4, h5, h6, p { margin: 0 0 0.5rem 0; }
h1 { font-weight: 500; font-size: 2.5rem; }
h2 { font-weight: 500; font-size: 2rem; }
h3 { font-weight: 500; font-size: 1.75rem; }
@ -112,8 +96,6 @@ $divisible: (0, 10, 20, 25, 30, 33, 34, 40, 50, 60, 66, 70, 75, 80, 90, 100);
h6 { font-weight: 500; font-size: 1rem; }
}
option { color: black !important; }
// Misc =====================================================================================================
// Center