Created
November 19, 2022 15:41
-
-
Save ltlapy/46859965318e6273a3a653d6f8da18f3 to your computer and use it in GitHub Desktop.
마스토돈 용으로 사용하는 커스텀 스타일을 빙자한 scss로 이루어진 일종의 스파게티와 같은 무언가
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```SCSS | |
* { | |
// --ui-3: #282c37; | |
--ui-3: pink; | |
// --ui-4: #393f4f; | |
--ui-4: cyan; | |
--accent: #f7b; | |
--hover: #f35; | |
--accent-fg: white; | |
--radius: 12px; | |
--radius2: var(--radius) var(--radius); | |
} | |
/** Background image **/ | |
html { height: 100% } | |
body { | |
background-image: linear-gradient(rgba(0,0,0,0.7),rgba(0,0,0,0.7)), url(https://files.lapy.link/_FMCkiSDVEAQgqBX_waifu2x_2x2160_mixture.png); | |
/* Full height */ | |
height: 100%; | |
/* Center and scale the image nicely */ | |
background-position: center center; | |
background-repeat: no-repeat; | |
background-size: cover; | |
} | |
/** Modify color palettes **/ | |
.button, .button.logo-button { | |
background-color: var(--accent); | |
&:is(:active, :focus, :hover) { | |
background-color: var(--hover); | |
} | |
} | |
// .icon-button { background-color: var(--accent); } | |
.icon-button.active, .notification__message .fa, .column-header__back-button { color: var(--accent); } | |
.icon-button.inverted.active { color: var(--accent); } | |
.dropdown-menu__item :is(a,button):is(:active, :focus, :hover), .privacy-dropdown.active .privacy-dropdown__value.active , .privacy-dropdown__option:is(.active, :hover) { | |
background-color: var(--accent) !important; | |
color: var(--accent-fg); | |
} | |
.active:is([role="img"]) { color: var(--accent) !important; } | |
.react-toggle--checked { | |
.react-toggle-track { | |
background-color: var(--accent); | |
} | |
.react-toggle-track-check { filter: drop-shadow(0 0 2px #000c); } | |
&:is(:hover,:focus-within):not(.react-toggle--disabled) { | |
.react-toggle-track { | |
background-color: var(--accent); filter: contrast(120%)} | |
} | |
} | |
/** Round UI tweaks **/ | |
.column, .drawer { | |
// .column-header__wrapper { | |
> :nth-child(1), h1.column-header#Lists > button { | |
margin-bottom: 0.7em; | |
.column-header { border-radius: var(--radius) } | |
:is(&,.column-header).active { | |
box-shadow: inherit; | |
&::before { background: none } | |
border-bottom: inherit; | |
} | |
button.column-header__button { | |
transition: background-color 0.2s, box-shadow 0.2s, color 0.2s; | |
&.active{ | |
box-shadow: 0px 0px 8px 4px #393f4f; | |
} | |
} | |
.column-header.active::before { | |
content:""; | |
position:absolute; | |
width:100%; | |
top:1px; | |
left: 0; | |
z-index:1; | |
box-shadow: 0px 0px 8px 2px var(--accent); | |
opacity: 66%; | |
} | |
} | |
.column-header__collapsible { | |
> ::before { | |
content:""; | |
position:absolute; | |
width:100%; | |
top:1px; | |
left: 0; | |
z-index:1; | |
box-shadow: 0px 0px 8px 2px #000000; | |
} | |
// .collapsed || .scrollable { | |
// opacity: 50%; | |
// } | |
box-shadow: 0px 0px 8px 2px #0005; | |
border-radius: 0 0 var(--radius2); | |
width: 93%; | |
position: absolute; | |
left: 50%; | |
transform: translate(-50%,0); | |
opacity: 100%; | |
transition: max-height .2s cubic-bezier(0.39, 0.575, 0.565, 1); | |
} | |
.notification__filter-bar { | |
background: transparent; | |
display: flex; | |
flex-grow: 0; | |
align-items: center; | |
align-content: center; | |
flex-basis: 30px; | |
button { | |
align-items: center; | |
justify-content: center; | |
height: 40px; | |
width: 40px; | |
border-radius: 20px; | |
// border: 1.2px solid; | |
margin: 5px; | |
padding: 0; | |
text-align: center; | |
transition: 0.2s all; | |
> { | |
height: 30px; | |
// text-align-last: center; | |
} | |
&.active { | |
// border: 2px solid; | |
box-shadow: 0 0 2px white; | |
} | |
&.active::after, &.active::before { | |
display: none; | |
} | |
} | |
} | |
// Trends | |
.getting-started__trends { | |
backdrop-filter: blur(6px) brightness(70%); | |
} | |
// .scrollable, .search__input, .drawer__pager, .getting-started { | |
> :last-child { | |
border-radius: var(--radius); | |
&::-webkit-scrollbar-thumb, &::-webkit-scrollbar:hover { | |
border-radius: var(--radius); | |
} | |
} | |
> *:not(.notification__filter-bar) { | |
border-radius: var(--radius); | |
box-shadow: 0 3px 6px black; | |
} | |
} | |
// finally, most important | |
.compose-form__publish-button-wrapper button { | |
color: transparent; | |
position: relative; | |
&::before { | |
content: "야옹?"; | |
visibility: visible; | |
display: block; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
left: 0px; | |
top: 0; | |
line-height: 22px; | |
padding: 7px 0px; | |
color: var(--accent-fg); | |
background: var(--accent); | |
} | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment