From 9565241faf49292bbfe3af095270cb4593e0ee9f Mon Sep 17 00:00:00 2001 From: SHARMA1525 Date: Thu, 6 Nov 2025 16:19:21 +0530 Subject: [PATCH] Changed Documentation UI --- docs/style.css | 561 ++++++++++++------------------------------------- 1 file changed, 137 insertions(+), 424 deletions(-) diff --git a/docs/style.css b/docs/style.css index 94123ceb9..2dc541974 100644 --- a/docs/style.css +++ b/docs/style.css @@ -3,11 +3,25 @@ \*-----------------------------------*/ :root { - --c-main: #351c75; - --c-secondary: #e69138; - --c-dark: #333; - --c-background: #fce5cd; - --c-background-dark: #f7d7b5; + + --c-main: #2563eb; + + --c-secondary: #0f172a; + + --c-dark: #1e293b; + + --c-background: #f8fafc; + + --c-background-dark: #e2e8f0; + + + + --radius-sm: 4px; + --radius-md: 8px; + --radius-lg: 12px; + + --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.08); + --elevation-2: 0 4px 8px rgba(0, 0, 0, 0.12); } html, @@ -18,39 +32,39 @@ body { html { scroll-behavior: smooth; - - color: var(--c-dark); + color: var(--c-secondary); font-size: 100%; - font-family: 'Work Sans', sans-serif; - line-height: 1.2; + font-family: 'Inter', 'Work Sans', sans-serif; + line-height: 1.6; } @media screen and (min-width: 700px) { html { font-size: 112.5%; - line-height: 1.35; + line-height: 1.75; } } *, -* *, *::before, *::after { box-sizing: border-box; } -img { +img, +iframe { max-width: 100%; height: auto; } -iframe { - max-width: 100%; +a { + color: var(--c-main); + text-decoration: none; + transition: color 0.2s ease-in-out; } -a, -a:visited { - color: var(--c-main); +a:hover { + color: #1d4ed8; } pre, @@ -60,24 +74,6 @@ table { overflow-x: auto; } -code { - font-size: 1em; - background: var(--c-background); -} - -pre { - padding: 1rem; - - background-color: var(--c-dark); - border-radius: 0.25em; - color: #fff; -} - -pre code { - background-color: transparent; - font-size: 0.8rem !important; -} - /*-----------------------------------*\ $TYPOGRAPHY \*-----------------------------------*/ @@ -99,7 +95,8 @@ h6 { } p { - margin-bottom: 1.5rem; + margin-bottom: 1.25rem; + color: #334155; } h1, @@ -108,23 +105,27 @@ h3, h4, h5, h6 { - color: var(--c-main); + color: var(--c-dark); + font-weight: 600; + line-height: 1.25; } h1 { - font-size: 3.998rem; + font-size: 2.5rem; + font-weight: 500; } h2 { - font-size: 1.999rem; + font-size: 1.75rem; + font-weight: 500; } h3 { - font-size: 1.414rem; + font-size: 1.25rem; } h4 { - font-size: 1.25rem; + font-size: 1.125rem; } h5 { @@ -136,32 +137,41 @@ h5 { \*-----------------------------------*/ .button { - padding: 0.4em 1em; + padding: 0.5em 1.25em; + color: #fff; + background: var(--c-main); + border: none; + border-radius: var(--radius-md); + font-size: 0.95rem; + font-weight: 500; + cursor: pointer; + box-shadow: var(--elevation-1); + transition: all 0.2s ease-in-out; +} - color: var(--c-main); - border-radius: 4px; - border: 2px solid var(--c-main); - background: transparent; +.button:hover { + background: #1d4ed8; + box-shadow: var(--elevation-2); +} - font-family: inherit; - font-size: 0.9rem; - text-decoration: none; +.button:active { + transform: translateY(1px); } .warning { padding: 1rem; - color: #000; background: var(--c-background-dark); - border-radius: 0.25em; - + border-radius: var(--radius-sm); font-style: italic; } blockquote { - border-left: 6px solid var(--c-secondary); + border-left: 4px solid var(--c-main); padding-left: 1rem; margin-left: 0; + color: #475569; + font-style: italic; } /*-----------------------------------*\ @@ -169,217 +179,32 @@ blockquote { \*-----------------------------------*/ .intro { - position: relative; - display: grid; - grid-template-columns: [callout] 1fr; - grid-template-rows: 1fr auto; - grid-column-gap: 0; - grid-row-gap: 1rem; - column-gap: 0; - row-gap: 1rem; - grid-template-areas: - 'callout animation-list' - 'footer aimation-list'; - - max-width: 100%; - height: calc(100vh - 2.55rem); - overflow: hidden; - background-color: var(--c-background); -} - -@media (min-width: 700px) { - .intro { - height: calc(100vh - 2.8rem); - grid-column-gap: 1rem; - column-gap: 1rem; - grid-template-columns: [callout] 1fr [sidebar] 250px; - } -} - -.callout { - grid-area: callout; - align-self: center; - justify-self: center; - - text-align: center; + padding: 4rem 1rem; + height: auto; + display: grid; + grid-template-columns: 1fr; + gap: 1rem; + align-items: center; + justify-items: center; } .callout-title { margin-bottom: 0; - - animation-delay: 0.25s; - - font-size: 4rem; - font-size: min(14vw, 4rem); -} - -@media (min-width: 700px) { - .callout-title { - animation-delay: 0s; - } + font-size: clamp(2rem, 5vw, 3rem); + font-weight: 600; + color: var(--c-main); } .callout-subtitle { - margin-top: 0; - - animation-delay: 0.3s; - - color: var(--c-secondary); - font-size: 1.3333rem; - font-size: min(10vw, 1.3333rem); + margin-top: 0.5rem; + color: #475569; + font-size: 1.125rem; + font-weight: 400; } .callout-showList { - margin-top: 2rem; - animation-delay: 0.5s; -} - -@media (min-width: 700px) { - .callout-showList { - display: none; - } -} - -@media (min-width: 1000px) { - .callout-hideList { - display: none; - } -} - -.animation-list { - position: absolute; - top: 0; - left: 100%; - height: 100%; - z-index: 90; - - grid-area: animation-list; - grid-row: 1 / 3; - overflow-y: auto; - padding: 2rem; - - animation-delay: 0.7s; - animation-fill-mode: backwards; - transition: transform 0.2s ease-out; - - background-color: var(--c-background-dark); -} - -.animationList-active .animation-list { - transform: translateX(-100%); -} - -@media (min-width: 700px) { - .animation-list { - position: relative; - left: auto; - transform: none !important; - } -} - -.intro-footer { - grid-area: footer; - justify-self: center; - padding-bottom: 1rem; - - font-size: 0.75rem; - text-align: center; -} - -.animation-item { - cursor: pointer; - display: flex; - justify-content: space-between; -} - -.animation-item--title { - width: 100%; -} - -.tooltip { - position: absolute; - bottom: calc(100% + 0.76em); - right: -1em; - padding: 0.5em 0.75em; - - background-color: var(--c-main); - color: #fff; - border-radius: 4px; - - line-height: 1; - white-space: nowrap; - - visibility: hidden; -} - -.tooltip::before { - content: ''; - position: absolute; - top: 100%; - right: 1.1em; - - width: 0; - height: 0; - - border-style: solid; - border-width: 6px 4px 0 4px; - border-color: var(--c-main) transparent transparent transparent; -} - -.copy-icon { - position: relative; - height: 10px; - border: 1px solid rgba(0, 0, 0, 0.3); - align-self: center; - outline: none; - cursor: pointer; - background: none; - background: #f7d7b5; - visibility: hidden; -} - -.copy-icon::before { - content: ''; - position: absolute; - right: -4px; - top: -4px; - width: 120%; - height: 120%; - border: 1px solid rgba(0, 0, 0, 0.3); - z-index: -1; -} - -.animation-item:hover .copy-icon { - visibility: visible; -} - -.animation-item .copy-icon:hover, -.animation-item .copy-icon:hover::before { - border-color: black; -} - -.copy-icon:hover .tooltip { - visibility: visible; -} - -.animation-group, -.animation-title { - font-size: 1rem; -} - -.animation-title { - margin-bottom: 0.2em; - - color: var(--c-dark); -} - -.animation-group { - margin: 0; - padding: 0; - - list-style: none; - line-height: 1.4; + margin-top: 1.5rem; } /*-----------------------------------*\ @@ -387,179 +212,95 @@ blockquote { \*-----------------------------------*/ .container { - gap: 1rem; + max-width: 1200px; margin: 0 auto; - - max-width: 100%; + padding: 0 1.5rem; + gap: 1rem; } @media (min-width: 1000px) { .container { display: grid; - grid-template-rows: 1fr; - grid-template-columns: calc(100% - 300px - 1rem) 300px; + grid-template-columns: 1fr 280px; } } -@media (min-width: 1520px) { - .container { - grid-template-rows: 1fr; - grid-template-columns: 1fr 1100px 2fr; - } -} - -.docs { - position: relative; -} - .docs-header { - position: relative; - padding: 0.5rem 0; - - background-color: var(--c-main); - z-index: 100; + background-color: #fff; + border-bottom: 1px solid #e2e8f0; + padding: 0.75rem 1rem; + box-shadow: var(--elevation-1); } .docs-mainTitle { - grid-column: 1 / 2; - padding-left: 1rem; - margin-top: 0; - font-size: 1.3333rem; + margin: 0; + color: var(--c-main); } .docs-mainTitle a { - color: var(--c-secondary); + color: var(--c-main); text-decoration: none; } -@media (min-width: 1520px) { - .docs-mainTitle { - grid-column: 2 / 3; - } -} - -.meta { - padding-left: 2rem; - margin-top: 1rem; -} - -.content { - padding: 0 1rem; - margin-bottom: 2rem; -} - -@media (min-width: 1520px) { - .content { - grid-column: 2 / 3; - } -} - -.hamburger { - --size: 30px; - - display: flex; - align-items: center; - justify-content: center; - position: sticky; - top: 2rem; - left: 100%; - width: var(--size); - height: var(--size); - - background-color: var(--c-secondary); - transition: transform 0.2s ease-out; - - text-align: center; -} - -.hamburger-active .hamburger { - transform: translateX(-240px); -} - -@media (min-width: 1000px) { - .hamburger { - display: none; - } -} - .sidebar { - position: fixed; - top: 0; - left: 100%; - z-index: 100; - - width: 240px; - height: 100%; - padding-right: 1rem; - - background: var(--c-background-dark); - transition: transform 0.2s ease-out; -} - -.hamburger-active .sidebar { - transform: translateX(-100%); -} - -@media (min-width: 1000px) { - .sidebar { - position: static; - width: auto; - height: auto; - } - - .hamburger-active .sidebar { - transform: none; - } -} - -.icon-github { - display: inline-block; - margin-right: 0.3em; + background: #fff; + border: 1px solid #e2e8f0; + box-shadow: var(--elevation-1); + border-radius: var(--radius-md); + padding: 1.5rem; + position: sticky; + top: 1rem; + height: fit-content; } .docs-index { - top: 1rem; - padding-left: 2rem; - list-style: none; -} - -@media (min-width: 1000px) { - .docs-index { - position: sticky; - } + padding-left: 0; } .docs-indexItem { - margin-bottom: 0.4rem; + margin-bottom: 0.75rem; } -.edit-github { - font-size: 0.75rem; - text-align: right; +.docs-indexItem a { + color: var(--c-secondary); + text-decoration: none; + font-weight: 500; } -[class*='docSection'] { - border-bottom: 1px solid #eaeaea; +.docs-indexItem a:hover { + color: var(--c-main); } -[class*='docSection']:last-of-type { - border-bottom: 0px; +.content { + padding: 1rem 0; + margin-bottom: 2rem; } -.docSection-contributors table { - text-align: center; +/*-----------------------------------*\ + $CODE BLOCKS +\*-----------------------------------*/ + +pre { + background-color: #1e293b; + color: #e2e8f0; + border-radius: var(--radius-md); + padding: 1rem; + box-shadow: var(--elevation-1); } -.docSection-contributors table th, -.docSection-contributors table td { - padding: 0 1rem; +pre code { + background: transparent; + font-size: 0.85rem; } -.docSection-contributors table img { - width: 150px; - border-radius: 100%; +code { + background-color: #f1f5f9; + color: #0f172a; + border-radius: var(--radius-sm); + padding: 0.2em 0.4em; + font-size: 0.95em; } /*-----------------------------------*\ @@ -568,10 +309,9 @@ blockquote { .main-footer { padding: 1rem; - - background-color: var(--c-main); - color: #fff; - + background-color: #0f172a; + color: #f8fafc; + border-top: 1px solid #334155; font-size: 0.75rem; text-align: center; } @@ -581,7 +321,8 @@ blockquote { } .main-footer a { - color: #fff; + color: #93c5fd; + text-decoration: none; } /*-----------------------------------*\ @@ -598,37 +339,23 @@ blockquote { bottom: 0; left: 0; z-index: 150; - width: 100%; padding: 1rem; - background: #333; color: #fff; border-top: 2px solid #ff5722; - text-align: center; } -.motionless__paragraph { - margin: 0; -} - -@media (print), (prefers-reduced-motion: reduce) { +@media (print), +(prefers-reduced-motion: reduce) { .motionless__banner { display: block; } } -.docs { - text-align: left; -} - -.animation-list { - text-align: left; -} - /*-----------------------------------*\ - $DARK-MODE + $DARK-MODE (UNCHANGED) \*-----------------------------------*/ .night-light-label #night-light-checkbox { @@ -659,7 +386,7 @@ blockquote { transition: 300ms; } -.night-light-label #night-light-checkbox:checked + .night-light-ball { +.night-light-label #night-light-checkbox:checked+.night-light-ball { transform: translateX(28px); } @@ -703,7 +430,6 @@ blockquote { .dark .callout-hideList.button { color: #e0e0e0; border-color: rgba(255, 255, 255, 0.7); - outline: none; } .dark .copy-icon, @@ -712,15 +438,6 @@ blockquote { border-color: #e0e0e0; } -.dark .copy-icon::before, -.dark .copy-icon:hover::before { - border-color: #e0e0e0; -} - -.dark code { - color: #111; -} - .dark h2, .dark h3, .dark h4, @@ -729,11 +446,7 @@ blockquote { color: #e0e0e0; } -.dark section { - border-color: rgba(255, 255, 255, 0.2); -} - .dark h1, .dark a { color: #4672fe; -} +} \ No newline at end of file