mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
* fixed overflown text, text above header, animation * Fixed pre tag overflowing * fixed h tags overflow
This commit is contained in:
@@ -45,6 +45,7 @@ export const HeaderWrapperSticky = styled.div`
|
|||||||
height: 74px;
|
height: 74px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
z-index:1;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: "";
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export const MarkdownWrapper = styled.div`
|
|||||||
h6 {
|
h6 {
|
||||||
font-family: ${fontFamily.header};
|
font-family: ${fontFamily.header};
|
||||||
letter-spacing: -1.75px;
|
letter-spacing: -1.75px;
|
||||||
|
overflow-wrap: break-word;
|
||||||
margin-top: ${BASE_LINE_HEIGHT * 2}px;
|
margin-top: ${BASE_LINE_HEIGHT * 2}px;
|
||||||
margin-bottom: ${BASE_LINE_HEIGHT}px;
|
margin-bottom: ${BASE_LINE_HEIGHT}px;
|
||||||
}
|
}
|
||||||
@@ -112,6 +113,7 @@ export const MarkdownWrapper = styled.div`
|
|||||||
letter-spacing: 0.25px;
|
letter-spacing: 0.25px;
|
||||||
color: #ebedee;
|
color: #ebedee;
|
||||||
font-family: "IBM Plex Mono", monospace;
|
font-family: "IBM Plex Mono", monospace;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:not(pre) > code[class*="language-"],
|
:not(pre) > code[class*="language-"],
|
||||||
@@ -124,7 +126,10 @@ export const MarkdownWrapper = styled.div`
|
|||||||
pre > code[class*="language-"] {
|
pre > code[class*="language-"] {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
pre{
|
||||||
|
overflow-x: auto;
|
||||||
|
min-height:28px; /* to fix line-height causing Y overflow */
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
@@ -176,7 +181,7 @@ export const MarkdownWrapper = styled.div`
|
|||||||
background-position: 0 100%;
|
background-position: 0 100%;
|
||||||
transition: all 0.125s ease-in;
|
transition: all 0.125s ease-in;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
word-break: break-all;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: black;
|
color: black;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
|||||||
@@ -16,16 +16,14 @@ export const SidebarWrapper = styled.div`
|
|||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
width: auto;
|
width: calc(100vw - 100px);
|
||||||
/* TODO: maybe find a less "awkward" way to animate this */
|
transition: transform 0.2s ease-in-out;
|
||||||
left: calc(-100% - 100px);
|
transform: translateX(-100vw)
|
||||||
right: calc(100% - 0px);
|
|
||||||
transition: left 0.3s, right 0.3s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-open {
|
&.is-open {
|
||||||
left: 0;
|
transition: transform 0.3s ease-in-out;
|
||||||
right: 100px;
|
transform: translateX(0);
|
||||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
@@ -34,7 +32,11 @@ export const Header = styled(Link)`
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
height: 74px; /* previously logo chose the height of the header */
|
||||||
|
@media screen and (max-width: 767px) {
|
||||||
|
/* match mobile header height */
|
||||||
|
height:calc(35px + 32px);
|
||||||
|
}
|
||||||
&:hover > * {
|
&:hover > * {
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
}
|
}
|
||||||
@@ -45,9 +47,9 @@ export const Logo = styled.div`
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: #0b0f13;
|
background: #0b0f13;
|
||||||
width: 74px;
|
height: 100%; /* match height of the header*/
|
||||||
height: 74px;
|
|
||||||
flex: 0 0 74px;
|
flex: 0 0 74px;
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
export const StyledLogo = styled(TPHLogo)`
|
export const StyledLogo = styled(TPHLogo)`
|
||||||
|
|||||||
Reference in New Issue
Block a user