■ ■ ■ ■ ■ ■
docs/src/theme/AnnouncementBar/styles.module.css
| 1 | + | :root { |
| 2 | + | --docusaurus-announcement-bar-height: auto; |
| 3 | + | } |
| 4 | + | |
| 5 | + | .announcementWrapper { |
| 6 | + | background-color: #f3f4f6; |
| 7 | + | padding: 1.5rem; |
| 8 | + | } |
| 9 | + | |
| 10 | + | .announcementBar { |
| 11 | + | display: flex; |
| 12 | + | align-items: center; |
| 13 | + | height: auto; |
| 14 | + | background-color: var(--ifm-color-white); |
| 15 | + | color: var(--ifm-color-black); |
| 16 | + | border: 1px solid transparent; |
| 17 | + | border-radius: 112px; |
| 18 | + | padding: .75rem 1.4rem; |
| 19 | + | /* shadow/default */ |
| 20 | + | box-shadow: 0px 1px 2px 0px rgba(28, 38, 63, 0.06), 0px 1px 3px 0px rgba(28, 38, 63, 0.10); |
| 21 | + | /* |
| 22 | + | Unfortunately we can't make announcement bar render above the navbar |
| 23 | + | IE need to use border-bottom instead of shadow |
| 24 | + | See https://github.com/facebookincubator/infima/issues/275 |
| 25 | + | |
| 26 | + | box-shadow: var(--ifm-global-shadow-lw); |
| 27 | + | z-index: calc(var(--ifm-z-index-fixed) + 1); |
| 28 | + | */ |
| 29 | + | border-bottom: 1px solid var(--ifm-color-emphasis-100); |
| 30 | + | } |
| 31 | + | |
| 32 | + | html[data-announcement-bar-initially-dismissed='true'] .announcementBar { |
| 33 | + | display: none; |
| 34 | + | } |
| 35 | + | |
| 36 | + | .announcementBarPlaceholder { |
| 37 | + | flex: 0 0 10px; |
| 38 | + | } |
| 39 | + | |
| 40 | + | /*.announcementBarClose {*/ |
| 41 | + | /* flex: 0 0 30px;*/ |
| 42 | + | /* align-self: stretch;*/ |
| 43 | + | /* margin-right: 1rem;*/ |
| 44 | + | /*}*/ |
| 45 | + | .announcementBarClose { |
| 46 | + | display: flex; |
| 47 | + | align-items: center; |
| 48 | + | } |
| 49 | + | |
| 50 | + | .announcementBarContent { |
| 51 | + | flex: 1 1 auto; |
| 52 | + | color: var(--primary-neutral-600); |
| 53 | + | font-size: .938rem; |
| 54 | + | font-weight: 500; |
| 55 | + | padding: 0; |
| 56 | + | } |
| 57 | + | |
| 58 | + | .announcementBarContent a { |
| 59 | + | color: #1E56E3; |
| 60 | + | text-decoration: none; |
| 61 | + | } |
| 62 | + | |
| 63 | + | @media print { |
| 64 | + | .announcementBar { |
| 65 | + | display: none; |
| 66 | + | } |
| 67 | + | } |
| 68 | + | |
| 69 | + | @media (min-width: 997px) { |
| 70 | + | :root { |
| 71 | + | --docusaurus-announcement-bar-height: 30px; |
| 72 | + | } |
| 73 | + | } |
| 74 | + | @media (max-width: 900px) { |
| 75 | + | .announcementBar { |
| 76 | + | border-radius: 1rem; |
| 77 | + | position: relative; |
| 78 | + | padding: 1rem; |
| 79 | + | } |
| 80 | + | .announcementBarContent { |
| 81 | + | text-align: left; |
| 82 | + | padding-right: 40px; |
| 83 | + | } |
| 84 | + | .announcementBarClose { |
| 85 | + | position: absolute; |
| 86 | + | right: 1rem; |
| 87 | + | margin-right: 0; |
| 88 | + | } |
| 89 | + | .announcementBarClose svg { |
| 90 | + | width: 1.5rem; |
| 91 | + | height: 1.5rem; |
| 92 | + | } |
| 93 | + | } |
| 94 | + | |
| 95 | + | [data-theme='dark'] .announcementBar { |
| 96 | + | box-shadow: none; |
| 97 | + | border: 1px solid #333E4B; |
| 98 | + | background-color: #28334F; |
| 99 | + | } |
| 100 | + | [data-theme='dark'] .announcementBarContent { |
| 101 | + | color: #E5E7EB; |
| 102 | + | } |
| 103 | + | [data-theme='dark'] .announcementBarContent a { |
| 104 | + | color: #80A3FF; |
| 105 | + | } |
| 106 | + | [data-theme='dark'] .announcementWrapper { |
| 107 | + | background-color: #1c262f; |
| 108 | + | } |