mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Use third grid column in graphs layout on wide screens (#2226)
* Use third grid column on graphs page when width > 1400px * Define column width more precisely * Center graphs inside containers * Fix graphs always showing 2+ columns (dae)
This commit is contained in:
parent
49455b4b14
commit
9ecc0ffdc6
2 changed files with 7 additions and 4 deletions
|
@ -9,8 +9,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
export let subtitle: string | null = null;
|
||||
</script>
|
||||
|
||||
<TitledContainer {title}>
|
||||
<div class="graph">
|
||||
<TitledContainer class="d-flex flex-column" {title}>
|
||||
<div class="graph d-flex flex-grow-1 flex-column justify-content-center">
|
||||
{#if subtitle}
|
||||
<div class="subtitle">{subtitle}</div>
|
||||
{/if}
|
||||
|
|
|
@ -56,9 +56,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
<style lang="scss">
|
||||
.graphs-container {
|
||||
display: grid;
|
||||
gap: 1.5em;
|
||||
grid-template-columns: 50% 50%;
|
||||
gap: 1em;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
|
||||
@media only screen and (max-width: 1400px) {
|
||||
grid-template-columns: 50% 50%;
|
||||
}
|
||||
@media only screen and (max-width: 1200px) {
|
||||
grid-template-columns: 100%;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue