File: repr.css

package info (click to toggle)
python-mne 1.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 131,492 kB
  • sloc: python: 213,302; javascript: 12,910; sh: 447; makefile: 144
file content (107 lines) | stat: -rw-r--r-- 4,216 bytes parent folder | download
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
Styles in this section apply both to the sphinx-built website docs and to notebooks
rendered in an IDE or in Jupyter. In our web docs, styles here are complemented by
doc/_static/styles.css and other CSS files (e.g. from the sphinx theme, sphinx-gallery,
or bootstrap). In IDEs/Jupyter, those style files are unavailable, so only the rules in
this file apply (plus whatever default styling the IDE applies).
*/
.mne-repr-table {
    display: inline;  /* prevent using full container width */
}
.mne-repr-table tr.mne-repr-section-header > th {
    padding-top: 1rem;
    text-align: left;
    vertical-align: middle;
}
.mne-repr-section-toggle > button {
    all: unset;
    display: block;
    height: 1rem;
    width: 1rem;
}
.mne-repr-section-toggle > button > svg {
    height: 60%;
}

/* transition (rotation) effects on the collapser button */
.mne-repr-section-toggle > button.collapsed > svg {
    transition: 0.1s ease-out;
    transform: rotate(-90deg);
}
.mne-repr-section-toggle > button:not(.collapsed) > svg {
    transition: 0.1s ease-out;
    transform: rotate(0deg);
}

/* hide collapsed table rows */
.mne-repr-collapsed {
    display: none;
}


@layer {
    /*
    Selectors in a `@layer` will always be lower-precedence than selectors outside the
    layer. So even though e.g. `div.output_html` is present in the sphinx-rendered
    website docs, the styles here won't take effect there as long as some other rule
    somewhere in the page's CSS targets the same element.

    In IDEs or Jupyter notebooks, though, the CSS files from the sphinx theme,
    sphinx-gallery, and bootstrap are unavailable, so these styles will apply.

    Notes:

    - the selector `.accordion-body` is for MNE Reports
    - the selector `.output_html` is for VSCode's notebook interface
    - the selector `.jp-RenderedHTML` is for Jupyter notebook
    - variables starting with `--theme-` are VSCode-specific.
    - variables starting with `--jp-` are Jupyter styles, *some of which* are also
      available in VSCode. Here we try the `--theme-` variable first, then fall back to
      the `--jp-` ones.
    */
    .mne-repr-table {
        --mne-toggle-color: var(--theme-foreground, var(--jp-ui-font-color1));
        --mne-button-bg-color: var(--theme-button-background, var(--jp-info-color0, var(--jp-content-link-color)));
        --mne-button-fg-color: var(--theme-button-foreground, var(--jp-ui-inverse-font-color0, var(--jp-editor-background)));
        --mne-button-hover-bg-color: var(--theme-button-hover-background, var(--jp-info-color1));
        --mne-button-radius: var(--jp-border-radius, 0.25rem);
    }
    /* chevron position/alignment; in VSCode it looks ok without adjusting */
    .accordion-body .mne-repr-section-toggle > button,
    .jp-RenderedHTML .mne-repr-section-toggle > button {
        padding: 0 0 45% 25% !important;
    }
    /* chevron color; MNE Report doesn't have light/dark mode */
    div.output_html .mne-repr-section-toggle > button > svg > path,
    .jp-RenderedHTML .mne-repr-section-toggle > button > svg > path {
        fill: var(--mne-toggle-color);
    }
    .accordion-body .mne-ch-names-btn,
    div.output_html .mne-ch-names-btn,
    .jp-RenderedHTML .mne-ch-names-btn {
        -webkit-border-radius: var(--mne-button-radius);
        -moz-border-radius: var(--mne-button-radius);
        border-radius: var(--mne-button-radius);
        border: none;
        background-image: none;
        background-color: var(--mne-button-bg-color);
        color: var(--mne-button-fg-color);
        font-size: inherit;
        min-width: 1.5rem;
        padding: 0.25rem;
        text-align: center;
        text-decoration: none;
    }
    .accordion-body .mne-ch-names-btn:hover,
    div.output_html .mne.ch-names-btn:hover,
    .jp-RenderedHTML .mne-ch-names-btn:hover {
        background-color: var(--mne-button-hover-bg-color);
        text-decoration: underline;
    }
    .accordion-body .mne-ch-names-btn:focus-visible,
    div.output_html .mne-ch-names-btn:focus-visible,
    .jp-RenderedHTML .mne-ch-names-btn:focus-visible {
        outline: 0.1875rem solid var(--mne-button-bg-color) !important;
        outline-offset: 0.1875rem !important;
    }
}