fc611df9453e98aacd4552f405833107d5110060
[wolnelektury.git] / apps / wolnelektury_core / static / scss / book_text / numbering.scss
1 @mixin hide-line-numbers {
2     float: left;
3     margin-left: -20px;
4
5     width: 20px;
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: 9px;
23         height: 100%;
24         overflow: hidden;
25         border-right: 1px solid #ccc;
26     }
27
28     @include min-screen(240px) {
29         width: 30px;
30         margin-left: -30px;
31
32         &:before {
33             width: 14px;
34         }
35     }
36 }
37
38
39 .anchor {
40     @include hide-line-numbers;
41
42     @include min-screen(320px) {
43         /* Show line numbers. */
44         margin-left: -50px;
45         width: 44px;
46         height: auto;
47         padding: 2px;
48         text-align: center;
49         color: #ccc;
50
51         &:before {
52             display: none;
53         }
54     }
55 }
56
57 @include min-screen(320px) {
58     .always-hide-line-numbers {
59         /* Cancel showing line numbers. */
60         .anchor {
61             @include hide-line-numbers;
62         }
63     }
64 }