Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Design fixes for the new design #2276

Open
wants to merge 8 commits into
base: v6/main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docusaurus/src/components/Card/card.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
@include dark {
--strapi-card-border-color: var(--strapi-neutral-150);
--strapi-card-title-color: var(--strapi-netral-1000);
--strapi-card-description-color: var(--strapi-netral-1000);
--strapi-card-description-color: var(--strapi-neutral-400);
--strapi-card-img-border-color: rgba(255, 255, 255, 0.5);
--strapi-card-hover-border-color: #49494D;

Expand Down
2 changes: 1 addition & 1 deletion docusaurus/src/pages/home/home.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
display: var(--strapi-home-faded-bg-display);
position: absolute;
z-index: -1;
top: 0;
top: -8px;
right: 0;
left: 0;
height: 448px;
Expand Down
106 changes: 63 additions & 43 deletions docusaurus/src/scss/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,51 @@ h2 .badge {
* space, so we adjust their position
*/

@media (max-width: 720px) {
// Disabled for now — we simply hide them on mobile
// @media (max-width: 720px) {
// main h1:has(.badge--content),
// main h2:has(.badge--content),
// main h3:has(.badge--content),
// main h4:has(.badge--content),
// main .theme-admonition:has(.badge--content),
// main .badge--content + img,
// main [class*="tabItem"]:has(.badge--content),
// main [class*="collapsibleContent"]:has(.badge--content),
// main .badge--content:has( + [class*="codeBlockContainer"]),
// main .badge--content:has(+ table) + table,
// main p:has(.badge--content) {
// .badge--content {
// position: relative;
// right: 0;
// left: initial;
// top: 0;
// }
// }
// main p:has(.badge--content) .badge--content {
// margin-right: 6px;
// }
// main .theme-admonition:has(.badge--content) .badge--content {
// top: 2.3em;
// left: -2.2em;
// }
// .badge__tooltip {
// position: absolute !important;
// right: 0;
// min-width: 100%;

// }

// .badge--updated,
// .badge--new {
// .badge__tooltip {
// // hide the "bubble" arrow on mobile for these
// &::after {
// display: none;
// }
// }
// }

@media (max-width: 1259px) {
main h1:has(.badge--content),
main h2:has(.badge--content),
main h3:has(.badge--content),
Expand All @@ -413,52 +457,28 @@ h2 .badge {
main .badge--content:has(+ table) + table,
main p:has(.badge--content) {
.badge--content {
position: relative;
right: 0;
left: initial;
top: 0;
display: none;
}
}
main p:has(.badge--content) .badge--content {
margin-right: 6px;
}
main .theme-admonition:has(.badge--content) .badge--content {
top: 2.3em;
left: -2.2em;
}
.badge__tooltip {
position: absolute !important;
right: 0;
min-width: 100%;
}

}

.badge--updated,
.badge--new {
.badge__tooltip {
// hide the "bubble" arrow on mobile for these
&::after {
display: none;
}
}
}

/**
* Display new/updated badges toolitps
* on the right of the badge on screens smaller than 720px
* instead of on top for larger screens
*/
.badge--updated .badge__tooltip {
min-height: 44px;
left: 85px !important;
top: -60%;
}
.badge--new .badge__tooltip {
min-height: 28px;
left: 90px !important;
top: -25%;
}
}
// /**
// * Display new/updated badges toolitps
// * on the right of the badge on screens smaller than 720px
// * instead of on top for larger screens
// */
// .badge--updated .badge__tooltip {
// min-height: 44px;
// left: 85px !important;
// top: -60%;
// }
// .badge--new .badge__tooltip {
// min-height: 28px;
// left: 90px !important;
// top: -25%;
// }
// }

/** Dark mode */
@include dark {
Expand Down
8 changes: 8 additions & 0 deletions docusaurus/src/scss/custom-doc-cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,11 @@
flex: 0 0 calc(100%) !important;
}
}

@include dark {
.custom-doc-card {
.cardDescription {
color: var(--strapi-neutral-400);
}
}
}
2 changes: 2 additions & 0 deletions docusaurus/src/scss/custom-search-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@
position: relative;
font-size: var(--strapi-font-size-sm);
line-height: var(--strapi-line-height-sm);
top: 1px;

i {
margin-right: 6px;
color: var(--strapi-neutral-500) !important;
}

@media screen and (max-width: 996px){
Expand Down
8 changes: 6 additions & 2 deletions docusaurus/src/scss/icons.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** Use this later to define custom styles for icons
.strapi-icons {
}
*/
article {
.strapi-icons {
position: relative;
top: 2px;
}
}
5 changes: 3 additions & 2 deletions docusaurus/src/scss/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,13 @@ $selector-color-mode-toggle-wrapper: 'div[class*="ColorModeToggle"]';
}
.theme-doc-sidebar-item-category-level-1.category-api > .menu__list-item-collapsible a {
&::before {
content: '\E1DA';
content: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgb(142,142,169)' viewBox='0 0 256 256'><rect width='16' height='16' fill='rgb(142,142,169)'/><path d='M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,120,47.65,76,128,32l80.35,44Zm8,99.64V133.83l80-43.78v85.76Z'/></svg>");
// content: '\E1DA';
}
}
.theme-doc-sidebar-item-category-level-1.category-upgrade > .menu__list-item-collapsible a {
&::before {
content: '\ECBC';
content: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgb(142,142,169)' viewBox='0 0 256 256'><rect width='16' height='16' fill='rgb(142,142,169)'/><path d='M240,56V96a16,16,0,0,1-16,16H187.5L93.88,213.43A8,8,0,0,1,88,216H32a16,16,0,0,1-16-16V160a16,16,0,0,1,16-16H68.5L162.12,42.57A8,8,0,0,1,168,40h56A16,16,0,0,1,240,56Zm-34.34,90.34a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,11.32,11.32L192,171.31V208a8,8,0,0,0,16,0V171.31l10.34,10.35a8,8,0,0,0,11.32-11.32Z'/></svg>");
}
}
}
Expand Down