aboutsummaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/comment.css
blob: af2c897a8e5835f1b48ac8a3351b37cddeecfc8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
 * Single comment.
 */

.comment {
    margin: 1rem .5rem 1rem .5rem;
    border: 1px solid var(--border);
    border-radius: var(--standard-border-radius);
    padding: .5rem 1rem;

    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.comment .comment-header {
    display: flex;
    gap: 10px;
}

.comment .comment-header .comment-header-title {
    flex-grow: 1;
}

.comment .comment-header .comment-header-actions {
    flex-grow: 0;
}

/*
 * Tweaks on Trix's toolbar in the comment section:
 *   - Make it work on smaller screens.
 *   - Hide the history tools on the desktop.
 */

trix-toolbar .trix-button-row {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
}

trix-toolbar .trix-button-group-spacer {
    display: none;
}

trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 0px;
}

trix-toolbar .trix-button-group {
    border: none;
}

/*
 * Display the history-tools for small screens, where the undo/redo experience
 * might actually be bad.
 */
trix-toolbar .trix-button-group--history-tools {
    display: flex;
}

@media (min-width: 600px) {
    trix-toolbar .trix-button-row {
        grid-template-columns: repeat(4, 1fr);
    }

    trix-toolbar .trix-button-group-spacer {
        display: none;
    }

    trix-toolbar .trix-button-group:not(:first-child) {
        margin-left: 0px;
    }
}

@media (min-width: 850px) {
    /* I actually don't like the history-tools parts on the desktop. */
    trix-toolbar .trix-button-group--history-tools {
        display: none;
    }

    trix-toolbar .trix-button-group:not(:first-child) {
        margin-left: 10px;
    }
}