@mideind/netskrafl-react 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1008,7 +1008,7 @@ div.netskrafl-container {
1008
1008
  /* The outer container fills its parent and paints the background */
1009
1009
  width: 100%;
1010
1010
  height: 100%;
1011
- overflow: auto;
1011
+ overflow: hidden;
1012
1012
  background-color: var(--container-bg-color);
1013
1013
  }
1014
1014
 
@@ -1020,8 +1020,8 @@ div.netskrafl-container {
1020
1020
  padding-top: 4px;
1021
1021
  /* font-family: var(--primary-font); */
1022
1022
  width: 375px;
1023
- /* Full height is 667px - we subtract 115px for browser chrome, top and bottom */
1024
- height: 586px; /* 552px; */
1023
+ height: calc(100vh - 58px);
1024
+ height: calc(100dvh - 58px);
1025
1025
  overflow-x: hidden;
1026
1026
  overflow-y: visible;
1027
1027
  margin: 0 auto;
@@ -2453,7 +2453,7 @@ div.netskrafl-tile.dragging div.letterscore {
2453
2453
  left: 0;
2454
2454
  top: 0;
2455
2455
  width: 375px;
2456
- height: 552px;
2456
+ height: 100%;
2457
2457
  overflow: hidden;
2458
2458
  font-size: 13px;
2459
2459
  line-height: 23px;
@@ -2740,7 +2740,7 @@ div.netskrafl-tile.dragging div.letterscore {
2740
2740
  top: 0;
2741
2741
  left: 0;
2742
2742
  width: 100%;
2743
- height: 458px;
2743
+ height: 466px;
2744
2744
  background-color: var(--tab-movelist-background);
2745
2745
  padding-top: 8px;
2746
2746
  padding-bottom: 0;
@@ -2754,7 +2754,7 @@ div.netskrafl-tile.dragging div.letterscore {
2754
2754
  padding: 0;
2755
2755
  overflow: auto;
2756
2756
  width: 100%;
2757
- height: 350px;
2757
+ height: 356px;
2758
2758
  }
2759
2759
 
2760
2760
  .netskrafl-container div.movelist.bestmoves {
@@ -3192,7 +3192,7 @@ div.netskrafl-tile.dragging div.letterscore {
3192
3192
  top: 0px;
3193
3193
  left: 0px;
3194
3194
  width: 100%;
3195
- height: 466px;
3195
+ height: 474px;
3196
3196
  background-color: var(--two-letter-background);
3197
3197
  overflow: hidden;
3198
3198
  z-index: 3;
@@ -3257,6 +3257,7 @@ div.netskrafl-tile.dragging div.letterscore {
3257
3257
 
3258
3258
  .netskrafl-container div#tabs,
3259
3259
  .netskrafl-container div#main-tabs {
3260
+ height: 100%;
3260
3261
  border-width: 0;
3261
3262
  padding: 0;
3262
3263
  }
@@ -3265,7 +3266,8 @@ div.netskrafl-tile.dragging div.letterscore {
3265
3266
  .netskrafl-container div#main-tabs > div[role="tabpanel"] {
3266
3267
  position: relative;
3267
3268
  top: -8px;
3268
- height: 504px;
3269
+ height: calc(100vh - 88px);
3270
+ height: calc(100dvh - 88px);
3269
3271
  /* Prevent scroll from propagating to parent */
3270
3272
  overscroll-behavior: contain;
3271
3273
  }
@@ -3762,7 +3764,8 @@ div.netskrafl-tile.dragging div.letterscore {
3762
3764
 
3763
3765
  .netskrafl-container div #userlist,
3764
3766
  .netskrafl-container div #elolist {
3765
- height: 396px;
3767
+ height: calc(100vh - 240px);
3768
+ height: calc(100dvh - 240px);
3766
3769
  /* 11 lines @ 36px each */
3767
3770
  overflow-y: auto;
3768
3771
  overflow-x: hidden;
@@ -3771,7 +3774,8 @@ div.netskrafl-tile.dragging div.letterscore {
3771
3774
  }
3772
3775
 
3773
3776
  .netskrafl-container div #gamelist {
3774
- height: 468px;
3777
+ height: calc(100vh - 124px);
3778
+ height: calc(100dvh - 124px);
3775
3779
  /* 13 lines @ 36px each */
3776
3780
  overflow-y: auto;
3777
3781
  overflow-x: hidden;
@@ -3780,7 +3784,8 @@ div.netskrafl-tile.dragging div.letterscore {
3780
3784
  }
3781
3785
 
3782
3786
  .netskrafl-container div #recentlist {
3783
- height: 396px;
3787
+ height: calc(100vh - 196px);
3788
+ height: calc(100dvh - 196px);
3784
3789
  /* 11 lines @ 36px each */
3785
3790
  overflow-y: auto;
3786
3791
  overflow-x: hidden;
@@ -3789,7 +3794,8 @@ div.netskrafl-tile.dragging div.letterscore {
3789
3794
  }
3790
3795
 
3791
3796
  .netskrafl-container div #usr-recent {
3792
- height: 432px;
3797
+ height: calc(100vh - 160px);
3798
+ height: calc(100dvh - 160px);
3793
3799
  /* 12 lines @ 36px each */
3794
3800
  overflow-y: auto;
3795
3801
  overflow-x: hidden;
@@ -3812,7 +3818,7 @@ div.netskrafl-tile.dragging div.letterscore {
3812
3818
  top: 0;
3813
3819
  left: 0;
3814
3820
  width: 100%;
3815
- height: 442px;
3821
+ height: 450px;
3816
3822
  background-color: var(--tab-games-background);
3817
3823
  overflow: auto;
3818
3824
  z-index: 2;
@@ -6449,14 +6455,6 @@ div.netskrafl-container input[type="checkbox"] {
6449
6455
  @media all and (max-width: 1023px) and (min-height: 632px) {
6450
6456
  /* iPhone X or taller */
6451
6457
  /* Tall mobile phones: use two lines to display the header */
6452
- .netskrafl-container div.tabbed-page {
6453
- height: 605px;
6454
- overflow: hidden;
6455
- }
6456
- .netskrafl-container div#tabs > div[role="tabpanel"],
6457
- .netskrafl-container div#main-tabs > div[role="tabpanel"] {
6458
- height: 556px;
6459
- }
6460
6458
  .netskrafl-container div.scoreleft {
6461
6459
  display: inline-block;
6462
6460
  position: relative;
@@ -6527,41 +6525,6 @@ div.netskrafl-container input[type="checkbox"] {
6527
6525
  .netskrafl-container div.board-area {
6528
6526
  top: 98px;
6529
6527
  }
6530
- .netskrafl-container div #userlist,
6531
- .netskrafl-container div #elolist {
6532
- height: 424px;
6533
- /* 14 lines @ 36px each */
6534
- }
6535
- .netskrafl-container div #gamelist {
6536
- height: 576px;
6537
- /* 16 lines @ 36px each */
6538
- }
6539
- .netskrafl-container div #recentlist {
6540
- height: 504px;
6541
- /* 14 lines @ 36px each */
6542
- }
6543
- .netskrafl-container div #usr-recent {
6544
- height: 540px;
6545
- /* 15 lines @ 36px each */
6546
- }
6547
- .netskrafl-container div #chall-sent,
6548
- .netskrafl-container div #chall-received {
6549
- height: 288px;
6550
- /* 8 lines @ 36px each */
6551
- }
6552
- .netskrafl-container div.chat-container,
6553
- .netskrafl-container div.twoletter {
6554
- height: 476px;
6555
- }
6556
- .netskrafl-container div.games {
6557
- height: 452px;
6558
- }
6559
- .netskrafl-container div.movelist-container {
6560
- height: 468px;
6561
- }
6562
- .netskrafl-container div.movelist {
6563
- height: 358px;
6564
- }
6565
6528
  }
6566
6529
 
6567
6530
  /* iPhone 11 or larger: scale the UI to appear larger on the screen */
@@ -6571,7 +6534,6 @@ div.netskrafl-container input[type="checkbox"] {
6571
6534
  ) {
6572
6535
  .netskrafl-container div.netskrafl-inner {
6573
6536
  margin-top: 4px;
6574
- height: 652px;
6575
6537
  }
6576
6538
  }
6577
6539
 
@@ -6583,13 +6545,16 @@ div.netskrafl-container input[type="checkbox"] {
6583
6545
  orientation: landscape
6584
6546
  ) {
6585
6547
  /* Mobile screen, landscape mode (width >= 667px AND landscape orientation) */
6548
+ div.netskrafl-container {
6549
+ container-type: inline-size;
6550
+ }
6586
6551
  .netskrafl-container div.netskrafl-inner {
6587
6552
  /* Reference width */
6588
6553
  width: 667px;
6589
6554
  /* Reference height */
6590
6555
  height: 100%;
6591
6556
  max-height: 686px;
6592
- overflow-y: hidden;
6557
+ overflow: visible;
6593
6558
  }
6594
6559
  .netskrafl-container div.header-logo {
6595
6560
  display: none;
@@ -6635,6 +6600,14 @@ div.netskrafl-container input[type="checkbox"] {
6635
6600
  left: 50%;
6636
6601
  width: 50%;
6637
6602
  }
6603
+ .netskrafl-container div.logo {
6604
+ display: block;
6605
+ position: absolute;
6606
+ top: 8px;
6607
+ left: calc(8px - (100cqw - 667px) / 2);
6608
+ width: 30px;
6609
+ z-index: 10;
6610
+ }
6638
6611
  .netskrafl-container div.board-area {
6639
6612
  position: absolute;
6640
6613
  top: 0;
@@ -6644,6 +6617,9 @@ div.netskrafl-container input[type="checkbox"] {
6644
6617
  top: 8px;
6645
6618
  padding-top: 1px;
6646
6619
  background-color: transparent;
6620
+ transform: scale(0.92);
6621
+ transform: scale(min(1, tan(atan2(100dvh - 16px, 408px))));
6622
+ transform-origin: right top;
6647
6623
  }
6648
6624
  .netskrafl-container div.rightcol {
6649
6625
  width: 283px;
@@ -6738,7 +6714,8 @@ div.netskrafl-container input[type="checkbox"] {
6738
6714
  display: none;
6739
6715
  }
6740
6716
  .netskrafl-container div.movelist-container {
6741
- height: 300px;
6717
+ height: calc(100vh - 90px);
6718
+ height: calc(100dvh - var(--header-size, 40px) - 44px);
6742
6719
  padding-top: 0px;
6743
6720
  padding-bottom: 0px;
6744
6721
  }
@@ -6747,7 +6724,9 @@ div.netskrafl-container input[type="checkbox"] {
6747
6724
  }
6748
6725
  .netskrafl-container div.right-area.with-clock div.movelist-container {
6749
6726
  /* If in a clock game, reduce the movelist height by two lines (2 * 20px) */
6750
- height: 260px;
6727
+ height: calc(100vh - 130px);
6728
+ height: calc(100dvh - var(--header-size, 40px) - 84px);
6729
+ max-height: 260px;
6751
6730
  }
6752
6731
  .netskrafl-container div.movelist-container div.bag {
6753
6732
  display: none;
@@ -6782,7 +6761,10 @@ div.netskrafl-container input[type="checkbox"] {
6782
6761
  }
6783
6762
  .netskrafl-container div.right-area {
6784
6763
  top: 8px;
6785
- height: 316px;
6764
+ height: calc(100vh - 16px);
6765
+ height: calc(100dvh - 16px);
6766
+ max-height: 316px;
6767
+ margin-top: 0;
6786
6768
  padding-top: 0;
6787
6769
  }
6788
6770
  .netskrafl-container span.list-chall {
@@ -6799,7 +6781,29 @@ div.netskrafl-container input[type="checkbox"] {
6799
6781
  }
6800
6782
  .netskrafl-container div#tabs > div[role="tabpanel"],
6801
6783
  .netskrafl-container div#main-tabs > div[role="tabpanel"] {
6802
- height: 326px;
6784
+ height: calc(100vh - 152px);
6785
+ height: calc(100dvh - 152px);
6786
+ max-height: 326px;
6787
+ }
6788
+ .netskrafl-container div #userlist,
6789
+ .netskrafl-container div #elolist {
6790
+ height: calc(100vh - 204px);
6791
+ height: calc(100dvh - 204px);
6792
+ max-height: 396px;
6793
+ }
6794
+ .netskrafl-container div #gamelist {
6795
+ height: calc(100vh - 150px);
6796
+ height: calc(100dvh - 150px);
6797
+ max-height: 468px;
6798
+ }
6799
+ .netskrafl-container div #recentlist,
6800
+ .netskrafl-container div #usr-recent {
6801
+ height: calc(100vh - 204px);
6802
+ height: calc(100dvh - 204px);
6803
+ max-height: 396px;
6804
+ }
6805
+ .netskrafl-container div#elo-toggler {
6806
+ top: 6px;
6803
6807
  }
6804
6808
  .netskrafl-container div#tabs-1 span.list-ts-short,
6805
6809
  .netskrafl-container div#tabs-1 span.list-manual,
@@ -6828,17 +6832,6 @@ div.netskrafl-container input[type="checkbox"] {
6828
6832
  }
6829
6833
  }
6830
6834
 
6831
- /* Short landscape screens - scale board down slightly */
6832
-
6833
- @media all and (min-width: 667px) and (orientation: landscape) and (
6834
- max-height: 360px
6835
- ) {
6836
- .netskrafl-container div.board {
6837
- transform: scale(0.96);
6838
- transform-origin: center top;
6839
- }
6840
- }
6841
-
6842
6835
  /* ==========================================================================
6843
6836
  RESPONSIVE: Large screen (iPad and larger, 1024px+)
6844
6837
  ========================================================================== */
@@ -6899,6 +6892,25 @@ div.netskrafl-container input[type="checkbox"] {
6899
6892
  width: 1024px;
6900
6893
  height: 686px;
6901
6894
  overflow-y: hidden;
6895
+ transition: zoom 200ms ease;
6896
+ }
6897
+ /* Scale down to fit within available width when embedded in a sidebar
6898
+ layout; --sidebar-width and --sidebar-width-icon are defined by
6899
+ Málstaður. When standalone (no sidebar), neither rule matches and
6900
+ zoom remains at default (1). */
6901
+ :has([data-slot="sidebar"][data-state="collapsed"]) div.netskrafl-inner {
6902
+ zoom: 0.92;
6903
+ zoom: min(
6904
+ 1,
6905
+ tan(atan2(100vw - var(--sidebar-width-icon, 4rem) - 24px, 1024px))
6906
+ );
6907
+ }
6908
+ :has([data-slot="sidebar"][data-state="expanded"]) div.netskrafl-inner {
6909
+ zoom: 0.77;
6910
+ zoom: min(
6911
+ 1,
6912
+ tan(atan2(100vw - var(--sidebar-width, 14rem) - 12px, 1024px))
6913
+ );
6902
6914
  }
6903
6915
  .netskrafl-container div.game-container {
6904
6916
  height: 100%;
@@ -7887,7 +7899,6 @@ div.netskrafl-container input[type="checkbox"] {
7887
7899
  width: 32px;
7888
7900
  }
7889
7901
  .netskrafl-container div.tabbed-page {
7890
- overflow: hidden;
7891
7902
  left: 110px;
7892
7903
  top: 12px;
7893
7904
  width: 900px;
@@ -7910,6 +7921,7 @@ div.netskrafl-container input[type="checkbox"] {
7910
7921
  .netskrafl-container div#tabs > div[role="tabpanel"],
7911
7922
  .netskrafl-container div#main-tabs > div[role="tabpanel"] {
7912
7923
  height: 657px;
7924
+ max-height: none;
7913
7925
  top: 0;
7914
7926
  }
7915
7927
  .netskrafl-container div.userid {
@@ -8194,14 +8206,17 @@ div.netskrafl-container input[type="checkbox"] {
8194
8206
  .netskrafl-container div #gamelist,
8195
8207
  .netskrafl-container div #elolist {
8196
8208
  height: 504px;
8209
+ max-height: none;
8197
8210
  /* 14 lines @ 36px each */
8198
8211
  }
8199
8212
  .netskrafl-container div #recentlist {
8200
8213
  height: 432px;
8214
+ max-height: none;
8201
8215
  /* 12 lines @ 36px each */
8202
8216
  }
8203
8217
  .netskrafl-container div #usr-recent {
8204
8218
  height: 432px;
8219
+ max-height: none;
8205
8220
  /* 12 lines @ 36px each */
8206
8221
  }
8207
8222
  .netskrafl-container div #chall-sent,