Skip to content

Improve docs styles #12891

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

Merged
merged 1 commit into from
Jun 22, 2021
Merged
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
44 changes: 15 additions & 29 deletions docs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions scaladoc-js/resources/scaladoc-searchbar.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* button */
.search span {
background: #ED3522;
fill: #fff;
background: var(--red500);
fill: var(--white);
cursor: pointer;
border: none;
padding: 9px;
border-radius: 24px;
box-shadow: 0 0 16px #F27264;
box-shadow: 0 0 16px var(--code-bg);
}
.search span:hover {
fill: #F27264;
background: var(--red600);
}

@media(max-width: 576px) {
Expand All @@ -29,7 +29,7 @@
}

#scaladoc-search {
margin-top: 10px;
margin-top: 16px;
cursor: pointer;
position: fixed;
top: 0;
Expand Down Expand Up @@ -65,15 +65,15 @@
}

#scaladoc-searchbar-results {
background: white;
background: var(--white);
display: flex;
flex-direction: column;
max-height: 500px;
overflow: auto;
}

.scaladoc-searchbar-result {
background: white;
background: var(--white);
line-height: 24px;
display: flex;
padding: 4px 10px 4px 10px;
Expand All @@ -90,11 +90,11 @@
}

.scaladoc-searchbar-result[selected] {
background-color: #d4edff;
background-color: var(--blue100);
}

.scaladoc-searchbar-result a {
color: #1f2326;
color: var(--grey900);
/* for some reason, with display:block if there's a wrap between the
* search result text and the location span, the dead space to the
* left of the location span doesn't get treated as part of the block,
Expand Down Expand Up @@ -134,7 +134,7 @@
background-size: 50% 2px, 2px 50%;
background-repeat: no-repeat;
border-radius: 12px;
box-shadow: 0 0 2px black;
box-shadow: 0 0 2px var(--black);
}

.snippet-comment-button:hover {
Expand Down
124 changes: 124 additions & 0 deletions scaladoc/resources/dotty_res/styles/colors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
:root {
/* White */
--white: hsl(193, 24%, 99%);

/* Black */
--black: hsl(200, 72%, 6%);

/* Grey */
--grey100: hsl(193, 24%, 97%);
--grey200: hsl(193, 20%, 95%);
--grey300: hsl(193, 16%, 86%);
--grey400: hsl(193, 16%, 74%);
--grey500: hsl(193, 16%, 66%);
--grey600: hsl(193, 14%, 52%);
--grey700: hsl(193, 14%, 42%);
--grey800: hsl(193, 12%, 28%);
--grey900: hsl(193, 12%, 16%);

/* Blue */
--blue100: hsl(200, 64%, 92%);
--blue200: hsl(200, 66%, 82%);
--blue300: hsl(200, 68%, 70%);
--blue400: hsl(200, 62%, 58%);
--blue500: hsl(200, 72%, 42%);
--blue600: hsl(200, 71%, 24%);
--blue700: hsl(200, 72%, 18%);
--blue800: hsl(200, 72%, 12%);
--blue900: hsl(200, 72%, 8%);

/* Red */
--red500: hsl(1 , 60% , 92%);
--red500: hsl(1 , 64% , 84%);
--red500: hsl(1 , 66% , 72%);
--red500: hsl(1 , 66% , 64%);
--red500: hsl(1 , 71% , 52%);
--red600: hsl(1 , 71% , 40%);
--red700: hsl(1 , 72% , 32%);
--red800: hsl(1 , 72% , 24%);
--red900: hsl(1 , 75% , 12%);


/* Light Mode */
--border-light: var(--grey200);
--border-medium: var(--grey300);

--body-bg: var(--white);
--body-fg: var(--grey900);
--title-fg: var(--grey800);

--active-bg: var(--blue300);
--active-bg-shadow: var(--blue400);
--active-fg: var(--grey900);

--inactive-bg: var(--grey400);
--inactive-bg-shadow: var(--grey700);
--inactive-fg: var(--grey700);

--code-bg: var(--grey200);
--code-fg: var(--grey800);
--symbol-fg: var(--grey900);
--documentable-bg: var(--grey200);

--link-fg: var(--blue500);
--link-hover-fg: var(--blue600);
--link-sig-fg: var(--blue500);

--leftbar-bg: var(--grey100);
--leftbar-fg: var(--grey900);
--leftbar-current-bg: var(--blue100);
--leftbar-current-fg: var(--blue500);
--leftbar-hover-bg: var(--blue100);
--leftbar-hover-fg: var(--grey900);

--footer-bg: var(--white);
--footer-fg: var(--grey700);

--icon-color: var(--grey400);
--selected-fg: var(--blue900);
--selected-bg: var(--blue200);
}

/* Dark Mode */
:root.theme-dark {
--border-light: var(--blue800);
--border-medium: var(--blue700);

--body-bg: var(--blue900);
--body-fg: var(--grey300);
--title-fg: var(--blue200);

--active-bg: var(--blue500);
--active-bg-shadow: var(--blue400);
--active-fg: var(--grey300);

--inactive-bg: var(--grey800);
--inactive-bg-shadow: var(--grey600);
--inactive-fg: var(--grey600);

--code-bg: var(--blue800);
--code-fg: var(--grey400);
--symbol-fg: var(--grey300);
--documentable-bg: var(--blue800);

--link-fg: var(--blue400);
--link-hover-fg: var(--blue300);
--link-sig-fg: var(--blue400);

--leftbar-bg: var(--black);
--leftbar-fg: var(--grey300);
--leftbar-current-bg: var(--blue700);
--leftbar-current-fg: var(--white);
--leftbar-hover-bg: var(--blue800);
--leftbar-hover-fg: var(--grey300);

--footer-bg: var(--blue900);
--footer-fg: var(--grey400);

--icon-color: var(--grey600);
--selected-fg: var(--blue800);
--selected-bg: var(--blue200);

--tab-selected: var(--white);
--tab-default: var(--grey300);
}
5 changes: 5 additions & 0 deletions scaladoc/resources/dotty_res/styles/diagram.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
height: 400px;
}

.diagram-class {
background-color: var(--code-bg);
margin-bottom: 16px;
}

.diagram-class a {
text-decoration: underline;
color: #FFF;
Expand Down
16 changes: 11 additions & 5 deletions scaladoc/resources/dotty_res/styles/filter-bar.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.documentableFilter {
padding: 24px 12px;
padding: 24px 24px 24px 12px;
background-color: var(--code-bg);
}

Expand All @@ -26,22 +26,28 @@
}

.filterToggleButton svg {
fill: var(--body-fg);
fill: var(--icon-color);
transition: fill 0.1s ease-in, transform 0.1s ease-in-out;
}

.filterToggleButton:hover svg,
.filterToggleButton:focus svg {
fill: var(--active-fg);
fill: var(--icon-color);
}

.filterableInput {
padding: 6px 4px;
flex: 1;
outline: 0;
border: 0;
border: 1px solid var(--border-medium);
border-radius: 3px;
background-color: var(--body-bg);
font-family: "Lato", sans-serif;
padding: 8px;
margin-left: 8px;
}

.filterableInput:focus {
border: 1px solid var(--active-bg-shadow);
}

.filterLowerContainer {
Expand Down
Loading