xref: /template/sprintdoc/css/area_nav-metabox.less (revision abe87137968795708b64d4d20050e3dfddcf2dba)
1#spr__meta-box {
2    .display-flex();
3    .flex-direction();
4    .justify-content(flex-end);
5
6    position: relative;
7    z-index: 10;
8    float: right;
9    max-width: 40%;
10    margin-top: -(@page_padding-top); // reverse padding-top of .page container
11    margin-right: -1px;
12
13    // >= 1024
14    @media @screen_min-md {
15        height: @page-header_height;
16        border: 1px solid transparent;
17    }
18
19    // < 1024
20    @media @screen_max-md {
21        position: relative;
22        top: -1px;
23        right: auto;
24        float: none;
25        display: block;
26        max-width: 100%;
27        min-height: @page-header_height;
28        height: auto;
29    }
30
31    // < 992
32    @media @screen_max-sm {
33        position: relative;
34        top: .2rem;
35        border: 0 none;
36    }
37
38    .tab-container {
39        display: table;
40
41        @media @screen_max-md {
42            display: block;
43            width: 100%;
44        }
45    }
46
47    .box-content {
48        position: relative;
49        height: 0;
50        overflow-y: visible;
51    }
52
53    ul.meta-tabs {
54        list-style: none;
55        line-height: 160%;
56        margin: 0;
57        padding: 0;
58
59        @media @screen_min-md {
60            white-space: nowrap;
61            text-align: right;
62        }
63
64        &::before,
65        &::after {
66            content: '';
67            clear: both;
68            display: table;
69            box-sizing: border-box;
70        }
71
72        > li:first-child {
73            > a {
74                margin-left: 0;
75            }
76        }
77
78        > li {
79            position: relative;
80            display: inline-block;
81            vertical-align: bottom;
82            margin: 0;
83
84            @media @screen_min-md {
85                margin-left: .3rem;
86            }
87
88            @media @screen_max-md {
89                margin-right: .5rem;
90            }
91
92            @media @screen_max-sm {
93                margin-right: .4rem;
94                margin-bottom: .2rem;
95            }
96
97            > a {
98                cursor: pointer;
99                position: relative;
100                display: block;
101                background-color: @color-site-bg;
102                border: 1px solid @color-border-light;
103                color: @color-link;
104                font-size: @font-size-small;
105                line-height: 1.42857143;
106                padding: .3em 1rem .1em;
107                margin-left: 4px;
108                transition: @transition color, @transition background-color, @transition border-color;
109
110                @media @screen_min-md {
111                    border-radius: @fix_border-radius @fix_border-radius 0 0;
112                }
113
114                @media @screen_max-md {
115                    top: -1px;
116                    background-color: @background_page-header;
117                    border-radius: 0 0 @fix_border-radius @fix_border-radius;
118                    margin-left: 0;
119                    padding: .2em .3rem .1em;
120                }
121
122                @media @screen_max-sm {
123                    top: 0;
124                    border-radius: 0;
125                    margin-top: .2rem;
126                    padding-bottom: .2em;
127                }
128
129                * {
130                    cursor: pointer;
131                    color: inherit;
132                }
133
134                .prefix {
135                    position: relative;
136                    color: inherit;
137                    font-size: @font-size-small;
138                    transition: @transition color;
139                }
140
141                &:hover,
142                &:focus,
143                &:active {
144                    background-color: @color-content-bg;
145                    border-color: @color-link;
146                    text-decoration: none;
147                }
148            }
149
150            &.active {
151                z-index: 1;
152
153                > a {
154                    cursor: default;
155                    background-color: @color-content-bg;
156                    border-color: @color-link;
157                    border-bottom-color: @color-content-bg;
158                    color: @color-link;
159
160                    @media @screen_max-md {
161                        border-radius: 0;
162                    }
163
164                    @media @screen_max-sm {
165                        background-color: @color-link;
166                        border-bottom-color: @color-link;
167                        color: @color-content-bg;
168                    }
169                }
170            }
171        }
172    }
173
174    .meta-content {
175        margin-top: -1px;
176
177        @media @screen_max-md {
178            clear: both;
179        }
180
181        @media @screen_max-md {
182            margin-top: -2px;
183        }
184
185        @media @screen_max-sm {
186            margin-top: 2px;
187        }
188
189        .tab-pane {
190            position: absolute;
191            top: 0;
192            right: 0;
193            display: none;
194            width: 100%;
195            background-color: @color-content-bg;
196            border: 1px solid @color-link;
197
198            @media @screen_min-xs {
199                min-width: 20em;
200            }
201
202            @media @screen_min-sm {
203                border-radius: 0 0 @fix_border-radius @fix_border-radius;
204            }
205
206            &.active {
207                display: block;
208                overflow: hidden;
209            }
210
211            > div {
212                font-size: @font-size-small;
213                padding: .8rem .5rem .5rem;
214
215                * {
216                    font-size: inherit;
217                }
218
219                p {
220                    padding-left: 1em;
221                }
222
223                ul {
224                    list-style: none;
225                    padding-left: 0;
226
227                    li {
228                        margin-left: 0;
229                        padding-left: 1em;
230                    }
231                }
232            }
233
234            &#spr__tab-tags {
235                > div {
236                    ul {
237                        li {
238                            padding-left: 0;
239                        }
240                    }
241                }
242            }
243
244            #dw__toc {
245                width: auto;
246                float: none;
247                margin: 0;
248                padding: .6rem .5rem .5rem .8rem;
249                background: transparent;
250                border: 0 none;
251
252                h3 {
253                    display: none;
254                }
255
256                > div {
257                    padding: 0;
258                }
259
260                > div ul.toc {
261                    font-size: @font-size-small;
262                    padding-left: .5em;
263
264                    a {
265                        font-size: @font-size-small;
266                        display: inline-block;
267                        padding-left: 10px;
268                        position: relative;
269                    }
270
271                    div.li {
272                        position: relative;
273                        padding: .15em 0;
274
275                        &::before {
276                            position: absolute;
277                            top: .6em;
278                            content: "";
279                            display: inline-block;
280                            width: 4px;
281                            height: 4px;
282                            background-color: #ccc;
283                            overflow: hidden;
284                            left: 0;
285                        }
286                    }
287                }
288
289                > div > ul.toc {
290                    padding: 0;
291                }
292            }
293        }
294    }
295
296    + .msg-area + a {
297        clear: right;
298        margin-top: 20px;
299    }
300}
301