Django 1.8 and other updates.
[wolnelektury.git] / apps / wolnelektury_core / static / scss / book_text / numbering.scss
1 @mixin hide-line-numbers {
2     float: left;
3     margin-left: -$W_NONUMBERS_TINY;
4
5     width: $W_NONUMBERS_TINY;
6     height: 100%;
7     padding: 0;
8     overflow: hidden;
9
10     color: white;
11     text-align: right;
12
13     &:hover, &:active {
14         color: #ccc;
15         background-color: #CCC;
16     }
17
18     &:before {
19         content: "#";
20         display: block;
21         float: left;
22         width: $W_NONUMBERS_TINY / 2 - 1px;
23         height: 100%;
24         overflow: hidden;
25         border-right: 1px solid #ccc;
26     }
27
28     @include min-screen($S_NONUMBERS_TINY_MAX) {
29         width: $W_NONUMBERS;
30         margin-left: -$W_NONUMBERS;
31
32         &:before {
33             width: $W_NONUMBERS / 2 - 1;
34         }
35     }
36 }
37
38
39 .anchor {
40     @include hide-line-numbers;
41
42     @include min-screen($S_NUMBERS) {
43         /* Show line numbers. */
44         font-size: .8em;
45         margin-left: -$W_NUMBERS;
46         width: $W_NUMBERS - 4px;
47         height: auto;
48         padding: 2px;
49         text-align: center;
50         color: #ccc;
51
52         &:before {
53             display: none;
54         }
55     }
56 }
57
58 @include min-screen($S_NUMBERS) {
59     .always-hide-line-numbers {
60         /* Cancel showing line numbers. */
61         .anchor {
62             @include hide-line-numbers;
63         }
64     }
65 }