Skip to content

Commit

Permalink
Merge pull request #14893 from schlawg/scratch
Browse files Browse the repository at this point in the history
remove breakpoint syntax and library
  • Loading branch information
ornicar committed Mar 17, 2024
2 parents bdc0474 + 60db2ea commit b2443ba
Show file tree
Hide file tree
Showing 170 changed files with 497 additions and 480 deletions.
30 changes: 0 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/analyse/css/_action-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
}
}

@include breakpoint($mq-col1) {
@include mq-is-col1 {
.abset-inline {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/_analyse.base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%border-bottom-active {
border-bottom: $border;

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
border-bottom: 3px solid $c-secondary;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/_fork.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $c-fork: $c-primary;

flex: 0 0 auto;

@include breakpoint($mq-col1) {
@include mq-is-col1 {
display: none;
}

Expand Down
10 changes: 5 additions & 5 deletions ui/analyse/css/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body {
#main-wrap {
--main-max-width: calc(100vh - #{$site-header-outer-height} - #{$col1-uniboard-controls});

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
--main-max-width: auto;
}
}
Expand Down Expand Up @@ -42,7 +42,7 @@ body {
&__underboard {
grid-area: under;

@include breakpoint($mq-col1-uniboard) {
@include mq-is-col1 {
overflow: hidden; // helps truncating long study names
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@ body {
'chat'
'uchat';

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
grid-template-columns: var(--col2-uniboard-width) $analyse-block-gap $col2-uniboard-table;
grid-template-rows: fit-content(0);
grid-template-areas:
Expand Down Expand Up @@ -112,11 +112,11 @@ body {
}
}

@include breakpoint($mq-col2-uniboard-squeeze) {
@include mq-is-col2-squeeze {
grid-template-columns: $col2-uniboard-squeeze-width $analyse-block-gap $col2-uniboard-squeeze-table;
}

@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
grid-template-columns: $col3-uniboard-side $analyse-block-gap var(--col3-uniboard-width) $analyse-block-gap $col3-uniboard-table;
grid-template-rows: auto $chat-height 2.5em 1fr;
grid-template-areas:
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/_player-clock.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $clock-height: 20px;
}

/* Where to put them in col1 layout? It moves the entire board and controls down for little benefit */
@include breakpoint($mq-col1) {
@include mq-is-col1 {
display: none;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/_round-training.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
margin: 0.6em 0;
}

@include breakpoint($mq-col1) {
@include mq-is-col1 {
flex-flow: row wrap;
justify-content: center;
padding-bottom: $analyse-block-gap;
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/_round-underboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $col2-panel-height: 240px;
&__panels {
--panel-height: #{$col1-panel-height};

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
--panel-height: #{$col2-panel-height};
}

Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/css/_side.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.back-to-game {
margin-top: 2em;

@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
margin-top: 10vh;
}

Expand All @@ -18,7 +18,7 @@
.analyse__wiki {
margin-top: 2vh;
flex: 1 1 auto;
@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
flex: 1 1 0;
padding: 0.5em 1em 0 0;
}
Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/css/_tools.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

.persistence {
color: $c-good;
@include breakpoint($mq-not-xx-small) {
@media (max-width: at-most($xx-small)) {
display: none;
}
}
Expand All @@ -140,7 +140,7 @@
color: $c-good-over;
}

@include breakpoint($mq-col1) {
@include mq-is-col1 {
height: $col1-uniboard-controls;

.fbt {
Expand Down
4 changes: 0 additions & 4 deletions ui/analyse/css/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
$mq-col1: $mq-col1-uniboard;
$mq-col2: $mq-col2-uniboard;
$mq-col3: $mq-col3-uniboard;

$meta-height: var(--meta-height);
$chat-height: var(--chat-height);
6 changes: 3 additions & 3 deletions ui/analyse/css/_zh.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $pocket-height: 60px;
'chat'
'uchat';

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
grid-template-rows: $pocket-height auto $pocket-height;
grid-template-areas:
'board gauge pocket-top'
Expand All @@ -44,7 +44,7 @@ $pocket-height: 60px;
'uchat . side';
}

@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
grid-template-rows: $pocket-height $meta-height $chat-height $pocket-height;
grid-template-areas:
'side . board gauge pocket-top'
Expand All @@ -56,7 +56,7 @@ $pocket-height: 60px;
}
}

@include breakpoint($mq-col1) {
@include mq-is-col1 {
.pocket {
&-top {
margin-bottom: $block-gap-half;
Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/css/explorer/_explorer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@
background: mix($c-primary, $c-bg-box, 25%);
font-weight: bold;

@include breakpoint($mq-col2) {
@include breakpoint($mq-x-short) {
@include mq-at-least-col2 {
@media (min-width: at-least($x-short)) {
position: sticky;
bottom: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/css/practice/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
grid-template-rows: auto;
grid-template-areas: 'board' 'controls' 'under' 'tools' 'side';

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
grid-template-areas: 'board gauge tools' 'under . controls' 'side . .';
}

@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
grid-template-rows: fit-content(0);
grid-template-areas: 'side . board gauge tools' '. . under . controls';

Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/study/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $top-height: 3.2rem;
height: $top-height;
font-size: 1.1em;

@include breakpoint($mq-xx-small) {
@media (min-width: at-least($xx-small)) {
font-size: 1.2em;
}
}
Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/css/study/_list-widget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $c-study: $c-primary;
display: grid;
grid-template-columns: repeat(auto-fill, minmax($viewport-min-width, 1fr));

@include breakpoint($mq-medium) {
@media (min-width: at-least($medium)) {
grid-template-columns: repeat(auto-fill, minmax(45ch, 1fr));
}

Expand Down Expand Up @@ -79,7 +79,7 @@ $c-study: $c-primary;
margin-#{$end-direction}: 0.2em;

@include transition;
@include breakpoint($mq-not-xx-small) {
@media (max-width: at-most($xx-small)) {
display: none;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/study/_modal.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.dialog-content {
min-width: 80vw;

@include breakpoint($mq-x-small) {
@media (min-width: at-least($x-small)) {
min-width: 500px;
}

Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/css/study/_player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ $player-height: 1.6rem;
border-radius: 0;
}

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
.analyse__underboard {
margin-top: calc(#{$player-height / 2} + #{$analyse-block-gap / 2});
}
}

@include breakpoint($mq-col1) {
@include mq-is-col1 {
.analyse__controls {
margin-top: $player-height;
}
Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/css/study/_search.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.study-search {
@include breakpoint($mq-xx-small) {
@media (min-width: at-least($xx-small)) {
width: 500px;
}
input {
Expand Down
12 changes: 6 additions & 6 deletions ui/analyse/css/study/relay/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ body {
--site-header-margin: 1em;
--allow-video: false;

@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
--allow-video: true;
}
}
Expand All @@ -21,7 +21,7 @@ main.is-relay {
grid-area: relay-admin;
}

@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
#video-player-placeholder,
button.streamer-show {
display: block;
Expand All @@ -43,7 +43,7 @@ main.is-relay.has-relay-tour {
max-height: 40vh;
}

@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
grid-template-rows: 80vh;
grid-template-areas:
'relay-tour . side'
Expand All @@ -57,7 +57,7 @@ main.is-relay.has-relay-tour {
}
}

@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
grid-template-columns: $col3-uniboard-side $block-gap-half var(--col3-uniboard-width) $block-gap-half $col3-uniboard-table;
grid-template-rows: $mq-col3-side-height;
grid-template-areas:
Expand All @@ -81,7 +81,7 @@ main.analyse.is-relay:not(.has-relay-tour) {
.chat__members {
display: none;
}
@include breakpoint($mq-col2) {
@include mq-at-least-col2 {
grid-template-rows: calc(var(--cg-height) / 2) calc(var(--cg-height) / 2) 2.5em;
grid-template-areas:
'board gauge side'
Expand All @@ -93,7 +93,7 @@ main.analyse.is-relay:not(.has-relay-tour) {
margin-top: unset;
}
}
@include breakpoint($mq-col3) {
@include mq-at-least-col3 {
grid-template-rows: var(--cg-height) 2.5em;
grid-template-areas:
'side . board gauge tools'
Expand Down
Loading

0 comments on commit b2443ba

Please sign in to comment.