xref: /template/sprintdoc/css/area_nav-usertools.less (revision 7dd86f6093459079f1c2a8ff9ac396611e2b144f)
1/**
2 * This file provides the design styles for the direct / menu jump links.
3 *
4 * @author Jana Deutschlaender <deutschlaender@cosmocode.de>
5 */
6
7
8#dokuwiki__usertools.nav-usertools {
9    @media @screen_min-md {
10        right: 1.25rem;
11    }
12
13    @media @screen_max-md {
14        position: absolute;
15        top: 0;
16        left: (@toggle-size + 1.25); // margin-left content
17        right: @headericons-margin-xxs;
18        margin-top: 0;
19        margin-right: 0;
20    }
21
22    &.has-bar {
23        @media @screen_min-md {
24            margin-top: @height-context-bar;
25            padding-top: .5em;
26        }
27    }
28
29
30/* + + + + +  icon list  + + + + + */
31    ul {
32        float: right;
33        padding: 0;
34        margin: (@very-small-spacing * 2) -.25rem 0 0;
35
36        @media @screen_max-md {
37            margin-right: .5rem;
38        }
39
40        @media @screen_max-xxs {
41            margin-right: -.3rem;
42        }
43
44        li {
45            .btn-usertools-wrapper(); // uniform li
46            .btn-usertools-num();
47
48            float: right;
49
50            @media @screen_max-xs {
51                display: block;
52                float: none;
53                margin-bottom: @headericons-margin-xxs;
54            }
55
56            @media @screen_max-xxs {
57                margin-bottom: (@headericons-margin-xxs - .2);
58            }
59
60            > span,
61            > a {
62                display: block;
63                width: auto;
64                min-height: @toggle-size;
65                overflow: hidden;
66                border: 1px solid @wikiicons-border;
67                border-radius: @ini_default_border_radius; // @ini_default_border_radius vs. @fix_border-radius
68                text-align: center;
69                margin: 0;
70
71                @media @screen_md-xlg {
72                    padding-top: .14rem;
73                }
74
75                @media @screen_only-lg {
76                    min-width: 2rem;
77                }
78            }
79
80/* !!! &.user-task FIND in plugins/do_tasks.less !!! */
81
82            &.user {
83                position: relative;
84                display: table-cell;
85                background-color: @ini_background_site;
86                border: solid 1px @wikiicons-border;
87                border-radius: @ini_default_border_radius; // @ini_default_border_radius vs. @fix_border-radius
88                color: @ini_text_webframe;
89                padding-right: .3rem;
90
91                @media @screen_min-md {
92                    padding-top: .35rem;
93                }
94
95                @media @screen_max-md {
96                    min-height: @toggle-size;
97                    padding-top: .3rem;
98                }
99
100                @media @screen_max-sm {
101                    padding-top: .35rem;
102                }
103
104                @media @screen_max-xs {
105                    position: absolute;
106                    top: @headericons-margin-xxs;
107                    right: (@toggle-size + @headericons-margin-xxs + 1); // 1.75rem + 1 + (button login/out margin-right)
108                    overflow: hidden;
109                    white-space: nowrap;
110                    margin: -1px 0 0;
111                    padding-top: .4rem;
112                }
113
114                @media @screen_max-xxs {
115                    left: -10px;
116                    right: (@toggle-size + @headericons-margin-xxs); // 1.75rem + .45rem
117                    width: auto;
118                    padding-top: .35rem;
119                }
120
121                > a {
122                    .display-flex();
123                    .align-items();
124
125                    position: relative;
126                    height: 1rem; // for IE11
127                    overflow: visible;
128                    background: @ini_nav_menu_hover_bg; // for removing bg-image
129                    border: 0 none;
130                    color: @ini_nav_menu_hover_color;
131                    text-indent: 0;
132                    font-size: inherit;
133                    margin-right: -.3rem;
134                    padding: 0 .2em 0 0;
135
136                    @media @screen_min-xxlg {
137                        min-height: (@toggle-size - .1);
138                        margin-top: -.4rem;
139                    }
140
141                    @media @screen_max-xxlg {
142                        min-height: (@toggle-size - .15);
143                        margin-top: -.35rem;
144                    }
145
146                    @media @screen_max-md {
147                        min-height: (@toggle-size - .1);
148                        margin-top: -.35rem;
149                    }
150
151                    @media @screen_max-sm {
152                        margin-top: -.35rem;
153                    }
154
155                    @media @screen_max-xs {
156                        margin-top: -.4rem;
157                    }
158
159                    &::before {
160                        content: '';
161                        top: -1px;
162                        bottom: -1px;
163                        left: -1px;
164                        right: -1px;
165                        width: auto;
166                        opacity: 0;
167                        border: solid 1px @ini_nav_menu_hover_color;
168                        border-radius: @ini_default_border_radius; // @ini_default_border_radius vs. @fix_border-radius
169                        color: inherit;
170                        transform: none;
171                    }
172
173                    &:hover,
174                    &:focus,
175                    &:active {
176                        background-color: @ini_nav_menu_hover_color;
177                        color: @ini_nav_menu_hover_bg;
178
179                        &::before {
180                            opacity: 1;
181                            border-color: @ini_nav_menu_hover_color;
182                        }
183
184                        bdi,
185                        bdi:first-of-type {
186                            color: @ini_nav_menu_hover_bg;
187                        }
188                    }
189                }
190
191                bdi {
192                    display: inline-block;
193                    color: inherit;
194                }
195
196                bdi:first-of-type {
197                    .fontello();
198                    .icon-user-circle();
199
200                    position: relative;
201                    margin: 0 0 0 .25rem;
202                    padding: 0 .1rem 0 1.3rem;
203
204                    &::before {
205                        position: absolute;
206                        left: -2px;
207                        font-size: 1.4rem;
208                        margin: 0;
209
210                        @media @screen_min-xxlg {
211                            top: -.25rem;
212                        }
213
214                        @media @screen_max-xxlg {
215                            top: -.2rem;
216                        }
217
218                        @media @screen_max-xs {
219                            top: -.25rem;
220
221                        }
222                    }
223                }
224            } // user
225        } // li
226
227
228/* + + +  icons  + + + */
229        a {
230            .fontello();
231            .hide-text-show-before();
232            .btn-hover();
233
234            cursor: pointer;
235            position: relative;
236            line-height: 1;
237            text-decoration: none;
238
239            @media @screen_md-xlg {
240                min-width: 2rem;
241            }
242
243            &::before {
244                .center-middle();
245
246                content: "?";
247                cursor: pointer;
248                display: block;
249                width: 100%;
250                box-sizing: border-box;
251                font-size: @font-size-default + (@font-scale-factor * 4);
252                line-height: 1;
253            }
254
255            /* icon register new user */
256            &.register {
257                .icon-user();
258            }
259
260            /* icon log-out */
261            &.logout {
262                .icon-logout();
263            }
264
265            /* icon log-in */
266            &.login {
267                .icon-login();
268            }
269
270            /* icon admin */
271            &.admin {
272                .icon-cog();
273
274                &::before {
275                    vertical-align: top;
276                }
277            }
278        } // a
279    } // ul
280} // nav-usertools
281