Skip to content

Commit 6db30ba

Browse files
committed
Chore: Merge branch 'content-re-grid' into 'add-card-example'
2 parents 5a52a5f + 54712a3 commit 6db30ba

File tree

8 files changed

+180
-137
lines changed

8 files changed

+180
-137
lines changed

assets/css/v2/style.css

Lines changed: 136 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ textarea:not([rows]) {
156156
--color-inline_codeblock-border: 0.85 0 0;
157157
--color-inline_codeblock-background: 0.98 0 0;
158158
--color-codeblock-border: 0.63 0 0;
159-
--color-codeblock-shadow: 0.92 0 0;
160159
--color-codeblock-background: 1 0 0;
161160
--color-codeblock-highlight: 0.99 0.0479 105.97;
162161
--color-footer: 0.23 0 0;
@@ -199,6 +198,7 @@ textarea:not([rows]) {
199198
--codeblock-comment-space-between: 10px;
200199
--codeblock-horizontal-line-length: 2rem;
201200
--codeblock-horizontal-line-overflow: 0.25rem;
201+
--codeblock-horizontal-padding: 1rem;
202202
--codeblock-border-thickness: 1px;
203203
--codeblock-code-section-padding-left: 1rem;
204204
--codeblock-line-box-side-length: 4px;
@@ -758,12 +758,12 @@ nav {
758758

759759
.homepage {
760760
--content-max-width: 120rem;
761+
margin: 0 2rem;
762+
line-height: 1.5rem;
761763

762-
.homepage-heading {
763-
grid-column: 1 / -1;
764-
font-size: 1.5rem;
765-
font-weight: 500;
766-
margin: 2rem 0rem;
764+
* {
765+
margin-left: 0;
766+
padding-left: 0;
767767
}
768768

769769
.homepage-section {
@@ -772,77 +772,91 @@ nav {
772772
gap: 1.5rem;
773773

774774
justify-content: center;
775-
max-width: 98rem;
775+
max-width: 100rem;
776776
margin: 0 auto;
777-
padding-bottom: 2rem;
777+
padding: 1rem;
778778

779779
a {
780780
color: oklch(var(--color-foreground));
781781
text-decoration-color: oklch(var(--color-background));
782782

783783
&:hover {
784+
box-shadow: 3px 3px 0px oklch(var(--color-brand) / 0.4);
784785
text-decoration-color: oklch(var(--color-background));
786+
border: 1px solid oklch(var(--color-brand) / 0.8);
785787
}
786788
}
787789

788-
.homepage-heading {
790+
.headerlink {
791+
cursor: default;
792+
pointer-events: none;
793+
794+
&::before {
795+
display: none;
796+
}
797+
}
798+
799+
> * {
789800
grid-column: 1 / -1;
790-
margin: 1rem 0rem;
801+
}
802+
803+
> p {
804+
grid-column: 1;
791805
}
792806
}
807+
}
793808

794-
/* Styling for items */
795-
.homepage-item {
796-
background: oklch(var(--color-background));
797-
border: 1px solid oklch(var(--color-codeblock-border));
798-
box-shadow: 3px 3px 0px oklch(var(--color-shadow));
799-
min-height: 11rem;
800-
padding: 1rem 2rem 2rem 2rem;
801-
display: flex;
802-
flex-direction: column;
803-
justify-content: space-between;
804-
cursor: pointer;
809+
/* MARK: Main content
810+
*/
805811

806-
&:hover {
807-
box-shadow: 3px 3px 0px oklch(var(--color-brand) / 0.4);
808-
text-decoration-color: oklch(var(--color-background));
809-
border: 1px solid oklch(var(--color-brand) / 0.8);
810-
}
812+
[data-grid="wide"] {
813+
grid-column: 1;
814+
}
815+
[data-grid="first-third"] {
816+
grid-column: 1;
817+
}
818+
[data-grid="last-third"] {
819+
grid-column: 1;
820+
}
821+
[data-grid="quarter"] {
822+
grid-column: 1;
823+
}
824+
[data-grid="third"] {
825+
grid-column: 1;
826+
}
827+
[data-grid="half"] {
828+
grid-column: 1;
829+
}
830+
831+
@media (min-width: 55rem) {
832+
[data-grid="wide"] {
833+
grid-column: 1 / -1;
811834
}
812835

813-
.homepage-item-heading {
814-
display: flex;
815-
align-items: center;
816-
justify-content: flex-start;
836+
[data-grid="first-third"] {
837+
grid-column: 1 / 4;
817838
}
818839

819-
.homepage-item-logo {
820-
margin-right: 0.5rem;
840+
[data-grid="first-two-thirds"] {
841+
grid-column: 1 / 8;
821842
}
822843

823-
.homepage-item-logo img {
824-
height: 40px;
825-
width: auto;
826-
display: block;
844+
[data-grid="last-third"] {
845+
grid-column: 8 / -1;
827846
}
828847

829-
.homepage-item-text {
830-
font-size: 1.1rem;
831-
font-weight: 600;
832-
line-height: 1.2;
833-
margin: 0;
834-
padding: 0;
835-
/* Hack to make text line-up with logos */
836-
transform: translateY(-6px);
848+
[data-grid="quarter"] {
849+
grid-column: span 3;
837850
}
838851

839-
.homepage-item-content {
840-
line-height: 1.5rem;
852+
[data-grid="third"] {
853+
grid-column: span 4;
841854
}
842-
}
843855

844-
/* MARK: Main content
845-
*/
856+
[data-grid="half"] {
857+
grid-column: span 6;
858+
}
859+
}
846860

847861
.content {
848862
grid-area: content;
@@ -854,7 +868,7 @@ nav {
854868
& > ul,
855869
& > ol {
856870
display: grid;
857-
grid-template-columns: 1fr;
871+
grid-template-columns: minmax(0, 1fr);
858872
/* These gaps determine the spacing between all content. Be careful!! */
859873
gap: var(--space-m) var(--space-m);
860874

@@ -871,19 +885,6 @@ nav {
871885
grid-column: 1;
872886
}
873887

874-
[data-grid="wide"] {
875-
grid-column: 1;
876-
}
877-
[data-grid="first-third"] {
878-
grid-column: 1;
879-
}
880-
[data-grid="last-third"] {
881-
grid-column: 1;
882-
}
883-
[data-grid="half"] {
884-
grid-column: 1;
885-
}
886-
887888
@media (min-width: 55rem) {
888889
max-width: var(--content-max-width);
889890
grid-template-columns: repeat(var(--grid-columns), 1fr);
@@ -892,33 +893,20 @@ nav {
892893
> li:not([data-grid]) {
893894
grid-column: 1 / 8;
894895
}
895-
896-
[data-grid="wide"] {
897-
grid-column: 1 / -1;
898-
}
899-
900-
[data-grid="first-third"] {
901-
grid-column: 1 / 4;
902-
}
903-
904-
[data-grid="first-two-thirds"] {
905-
grid-column: 1 / 8;
906-
}
907-
908-
[data-grid="last-third"] {
909-
grid-column: 8 / -1;
910-
}
911-
912-
[data-grid="half"] {
913-
grid-column: span 6;
914-
}
915896
}
916897
}
917898

918899
/* Allow redocly to fill the entire container */
919900
&.content__redocly {
920901
justify-self: unset;
921-
max-width: unset;
902+
max-width: 100%;
903+
904+
#api-component {
905+
z-index: 0;
906+
position: relative;
907+
display: block;
908+
max-width: 100%;
909+
}
922910
}
923911
}
924912

@@ -1458,16 +1446,38 @@ h6:has(a):hover {
14581446
}
14591447

14601448
/* Landing page cards */
1449+
1450+
.homepage {
1451+
.card-grid {
1452+
grid-template-columns: 1fr;
1453+
1454+
@media (min-width: 70rem) {
1455+
grid-template-columns: repeat(12, 1fr);
1456+
}
1457+
}
1458+
1459+
.card-layout .card-grid .card {
1460+
padding: 1rem 2rem 2rem 2rem;
1461+
1462+
.lucide,
1463+
.card-brand-icon {
1464+
height: 40px;
1465+
width: auto;
1466+
}
1467+
}
1468+
}
1469+
14611470
.card-layout {
1462-
grid-column: 1;
1471+
display: flex;
1472+
flex-direction: column;
1473+
gap: 1.5rem;
14631474

14641475
.card-section {
1465-
display: flex;
1466-
flex-direction: column;
1467-
gap: 1rem;
1468-
14691476
strong {
14701477
font-weight: 500;
1478+
font-size: var(--font-step-2);
1479+
display: block;
1480+
margin-bottom: 1rem;
14711481
}
14721482

14731483
&.featured-section {
@@ -1479,20 +1489,17 @@ h6:has(a):hover {
14791489
}
14801490

14811491
.card {
1482-
display: flex;
1483-
flex-direction: column;
1484-
gap: 0.5rem;
1485-
margin-bottom: 1rem;
1486-
order: 2;
1487-
1488-
&.featured-card {
1489-
order: 1;
1492+
.card-container {
1493+
display: flex;
1494+
flex-direction: column;
1495+
gap: 0.5rem;
14901496
}
14911497

14921498
.card-header {
14931499
display: flex;
14941500
flex-direction: row;
1495-
gap: 0.5rem;
1501+
gap: 1rem;
1502+
align-items: center;
14961503

14971504
.card-brand-icon {
14981505
height: 20px;
@@ -1514,7 +1521,7 @@ h6:has(a):hover {
15141521
grid-template-columns: repeat(var(--grid-columns), 1fr);
15151522
gap: 1.5rem;
15161523

1517-
@media (max-width: 68rem) {
1524+
@media (max-width: 55rem) {
15181525
grid-template-columns: 1fr;
15191526
}
15201527

@@ -1844,12 +1851,37 @@ a:has(code:not(pre code)) {
18441851

18451852
/* Regular Codeblock */
18461853
.highlight {
1847-
padding: 0 1rem 0 1rem;
1854+
padding: 0 var(--codeblock-horizontal-padding) 0
1855+
var(--codeblock-horizontal-padding);
18481856
position: relative;
18491857
flex: 1;
18501858

1851-
code .cl {
1852-
position: relative;
1859+
code {
1860+
font-size: var(--font-step--1);
1861+
1862+
.cl {
1863+
position: relative;
1864+
}
1865+
}
1866+
1867+
table {
1868+
width: calc(100% + var(--codeblock-horizontal-padding));
1869+
}
1870+
1871+
.lntd:first-child pre code {
1872+
span {
1873+
margin-left: -1rem;
1874+
padding-left: 1rem;
1875+
width: calc(100% + 1rem);
1876+
}
1877+
}
1878+
1879+
pre code .line {
1880+
display: inline;
1881+
}
1882+
1883+
pre code .line.hl {
1884+
display: block;
18531885
}
18541886
}
18551887

@@ -1880,10 +1912,6 @@ a:has(code:not(pre code)) {
18801912
/* margin: 1.5rem 0 0.25rem 0; */
18811913
}
18821914

1883-
.highlight code {
1884-
font-size: 0.875rem;
1885-
}
1886-
18871915
.highlight-v2.single-line {
18881916
display: flex;
18891917
align-items: center;
@@ -1907,7 +1935,7 @@ a:has(code:not(pre code)) {
19071935
}
19081936

19091937
.code-container {
1910-
box-shadow: 2px 2px 0px oklch(var(--color-codeblock-shadow));
1938+
box-shadow: 3px 3px 0px oklch(var(--color-shadow));
19111939
}
19121940

19131941
ol .code-block,
@@ -1955,6 +1983,7 @@ ul .code-block {
19551983
.highlight code .hl {
19561984
width: fit-content;
19571985
min-width: 100%;
1986+
display: block;
19581987
background-color: oklch(var(--color-codeblock-highlight));
19591988
}
19601989

0 commit comments

Comments
 (0)