soapbox/app/styles/components/tabs-bar.scss

325 wiersze
5.7 KiB
SCSS
Czysty Zwykły widok Historia

2020-03-27 20:59:38 +00:00
.tabs-bar {
display: flex;
box-sizing: border-box;
2020-05-31 05:21:41 +00:00
background: var(--brand-color);
flex: 0 0 auto;
overflow-y: auto;
height: 50px;
2020-10-01 23:57:11 +00:00
width: 100%;
position: sticky;
top: 0;
z-index: 1000;
transition: transform 0.2s ease;
&--collapsed {
@media screen and (max-width: 895px) {
margin-top: -50px;
transform: translateY(-50px);
}
}
&__container {
display: flex;
box-sizing: border-box;
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
// NOTE - might need to adjust this based on column sizing
@media screen and (max-width: $nav-breakpoint-4) { padding: 0 10px; }
}
&__split {
display: flex;
width: auto;
&--left {
margin-right: auto;
}
&--right {
margin-left: auto;
2020-07-20 20:34:54 +00:00
align-items: center;
}
}
&__search-container {
display: block;
2021-09-12 23:51:39 +00:00
width: 351px;
2021-09-13 00:08:41 +00:00
align-self: center;
@media screen and (max-width: 895px) {
display: none;
}
}
&__profile {
position: relative;
overflow: hidden;
2020-07-11 04:35:02 +00:00
margin: 0 0 0 10px;
height: 34px;
width: 34px;
.account__avatar {
width: 34px;
height: 34px;
background-size: cover;
}
.compose__action-bar {
display: block;
position: absolute;
top: 0;
right: 0;
left: -5px;
bottom: 0;
i {
display: none;
}
@media screen and (max-width: 1190px) {
display: none;
}
}
}
&__sidebar-btn {
display: block;
position: absolute;
top: 0;
2020-03-27 20:59:38 +00:00
right: 0;
left: 0;
bottom: 0;
width: 30px;
opacity: 0;
2020-03-27 20:59:38 +00:00
@media (min-width: 1191px) {
display: none;
}
}
2020-03-27 20:59:38 +00:00
&__page-name {
display: block;
2020-03-27 20:59:38 +00:00
margin-left: 18px;
line-height: 30px;
font-weight: 600;
font-size: 18px;
color: #fff;
@media (min-width: 896px) {
display: none;
}
}
&__button-compose {
display: block;
@media screen and (max-width: $nav-breakpoint-3) { display: none; }
height: 34px;
margin-left: 20px;
2020-05-31 22:14:18 +00:00
border-radius: 6px;
2020-06-07 17:17:10 +00:00
background-color: var(--accent-color);
2020-05-24 22:48:52 +00:00
font-weight: bold;
font-size: 16px;
2020-05-31 22:14:18 +00:00
transition: 0.2s;
2020-06-07 18:14:18 +00:00
> span {
text-shadow: 0 0 3px hsla(0, 0%, 0%, 0.15);
}
&:hover {
2020-06-07 17:17:10 +00:00
background-color: var(--accent-color--bright);
}
}
&__button {
margin-left: 12px;
2020-03-27 20:59:38 +00:00
height: 34px;
}
2020-03-27 20:59:38 +00:00
.theme-toggle {
@media screen and (max-width: $nav-breakpoint-3) { display: none; }
2020-07-19 21:50:16 +00:00
.setting-toggle {
margin-left: 10px;
2020-09-03 23:04:34 +00:00
.react-toggle-track {
background-color: var(--foreground-color);
2020-09-03 23:04:34 +00:00
}
.react-toggle--checked {
.react-toggle-track {
background-color: var(--accent-color);
}
2020-07-20 20:34:54 +00:00
&:hover:not(.react-toggle--disabled) .react-toggle-track,
&.react-toggle--focus .react-toggle-track {
background-color: var(--accent-color--bright);
}
2020-07-19 21:50:16 +00:00
}
}
}
2020-03-27 20:59:38 +00:00
}
.tabs-bar__link {
display: flex;
flex: 1 1 auto;
margin: 0 20px 0 0;
color: #fff;
text-decoration: none;
position: relative;
align-items: center;
padding-right: 4px;
2020-06-01 04:18:39 +00:00
font-weight: bold;
transition: 0.1s;
outline: none;
2020-06-07 18:14:18 +00:00
text-shadow: 0 0 3px hsla(0, 0%, 0%, 0.15);
@media screen and (max-width: 895px) {
width: 36px;
margin: 4px 4px 0 0;
justify-content: center;
& > span { display: none; }
}
> span {
font-size: 15px;
line-height: 50px;
2020-03-27 20:59:38 +00:00
margin-left: 4px;
}
&--search {
@media (min-width: 896px) {
display: none;
}
}
i.fa {
font-size: 14px;
transform: translate(-1px, -1px);
transition: 0.1s;
@media screen and (max-width: 895px) {
font-size: 20px;
}
&.fa-home {
font-size: 18px;
transform: translate(-1px, -2px);
@media screen and (max-width: 895px) {
font-size: 26px;
}
}
}
.icon-with-counter__counter {
@media screen and (min-width: 896px) {
left: 5px;
}
}
&.optional {
display: none;
@media screen and (max-width: $nav-breakpoint-2) {
display: flex;
background-position: -992px 11px;
}
}
&::before {
content: "";
2020-03-27 20:59:38 +00:00
display: block;
2020-06-07 17:17:10 +00:00
background: var(--accent-color);
2020-03-27 20:59:38 +00:00
position: absolute;
transition: 0.2s;
2020-06-01 04:18:39 +00:00
left: 0;
bottom: auto;
opacity: 0;
height: 15px;
border-radius: 999px;
z-index: -1;
width: calc(100% + 20px);
margin-left: -12px;
@media screen and (max-width: 895px) {
height: 0;
border-radius: 3px 3px 0 0;
bottom: 0;
}
}
&.active::before,
&:hover::before,
&:focus::before {
2020-06-01 04:18:39 +00:00
height: 30px;
opacity: 1;
@media screen and (max-width: 895px) {
height: 7px;
width: 36px;
margin: 0;
}
}
&--logo {
display: block;
margin-right: 30px;
border: 0;
2020-08-07 20:17:13 +00:00
height: 40px;
2020-04-29 05:36:25 +00:00
overflow: hidden;
2020-08-07 20:17:13 +00:00
padding: 13px 0 0;
2020-04-29 05:36:25 +00:00
box-sizing: border-box;
filter: brightness(0%) grayscale(100%) invert(100%);
& span { display: none !important; }
2020-04-29 05:36:25 +00:00
img {
height: 100%;
}
&:hover {
border: 0 !important;
}
2021-09-26 17:11:54 +00:00
/* Move logo to center on mobile */
@media screen and (max-width: 450px) {
margin: 0 auto;
position: absolute;
left: 0;
right: 0;
text-align: center;
}
}
&--no-highlight,
&--no-highlight:hover,
&--no-highlight.active,
&--no-highlight:active,
&--no-highlight:focus {
background: transparent !important;
border-bottom-color: transparent !important;
}
}
.tabs-bar__split--left:hover .tabs-bar__link {
&::before {
2020-06-01 04:18:39 +00:00
height: 15px;
opacity: 0;
@media screen and (max-width: 895px) {
height: 0;
}
}
&:hover::before {
2020-06-01 04:18:39 +00:00
height: 30px;
opacity: 1;
@media screen and (max-width: 895px) {
height: 7px;
}
}
2020-03-27 20:59:38 +00:00
}