@mideind/netskrafl-react 3.4.0 → 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
  }
@@ -3666,17 +3668,32 @@ div.netskrafl-tile.dragging div.letterscore {
3666
3668
  }
3667
3669
 
3668
3670
  .netskrafl-container div#promo-form {
3669
- top: 64px;
3671
+ top: 16px;
3670
3672
  left: 12px;
3671
- width: 327px;
3672
- height: 364px;
3673
- line-height: 1.5em;
3673
+ right: 12px;
3674
+ bottom: 16px;
3675
+ width: auto;
3676
+ height: auto;
3677
+ line-height: 1.4em;
3678
+ font-size: 14px;
3679
+ display: flex;
3680
+ flex-direction: column;
3674
3681
  }
3675
3682
 
3676
3683
  .netskrafl-container div.promo-content {
3677
- margin-top: 16px;
3678
- margin-left: 16px;
3679
- margin-right: 16px;
3684
+ margin-top: 12px;
3685
+ margin-left: 4px;
3686
+ margin-right: 4px;
3687
+ overflow-y: auto;
3688
+ flex: 1;
3689
+ }
3690
+
3691
+ .netskrafl-container div.promo-content ul {
3692
+ padding-left: 20px;
3693
+ }
3694
+
3695
+ .netskrafl-container div.promo-content li {
3696
+ margin-bottom: 6px;
3680
3697
  }
3681
3698
 
3682
3699
  .netskrafl-container div.promo-fullscreen {
@@ -3687,9 +3704,17 @@ div.netskrafl-tile.dragging div.letterscore {
3687
3704
  display: block;
3688
3705
  }
3689
3706
 
3707
+ .netskrafl-container div.promo-buttons {
3708
+ display: flex;
3709
+ flex-direction: row;
3710
+ gap: 12px;
3711
+ padding: 12px 4px;
3712
+ flex-shrink: 0;
3713
+ }
3714
+
3690
3715
  .netskrafl-container div.btn-promo-yes {
3691
3716
  text-align: center;
3692
- font-size: 18px;
3717
+ font-size: 16px;
3693
3718
  font-weight: 700;
3694
3719
  color: white;
3695
3720
  margin: 0;
@@ -3697,18 +3722,14 @@ div.netskrafl-tile.dragging div.letterscore {
3697
3722
  padding-top: 9px;
3698
3723
  border-radius: 5px;
3699
3724
  cursor: pointer;
3700
- position: absolute;
3701
- width: 200px;
3702
- height: 28px;
3703
- bottom: 24px;
3704
- right: 222px;
3705
- top: auto;
3725
+ flex: 1;
3726
+ height: 26px;
3706
3727
  background-color: var(--ok-button);
3707
3728
  }
3708
3729
 
3709
3730
  .netskrafl-container div.btn-promo-no {
3710
3731
  text-align: center;
3711
- font-size: 18px;
3732
+ font-size: 16px;
3712
3733
  font-weight: 700;
3713
3734
  color: white;
3714
3735
  margin: 0;
@@ -3716,13 +3737,10 @@ div.netskrafl-tile.dragging div.letterscore {
3716
3737
  padding-top: 9px;
3717
3738
  border-radius: 5px;
3718
3739
  cursor: pointer;
3719
- position: absolute;
3720
- width: 80px;
3721
- height: 28px;
3722
- bottom: 24px;
3723
- right: 24px;
3724
- top: auto;
3725
- background-color: var(--ok-button);
3740
+ width: 100px;
3741
+ flex-shrink: 0;
3742
+ height: 26px;
3743
+ background-color: var(--light-shadow);
3726
3744
  }
3727
3745
 
3728
3746
  /* Game limit dialog */
@@ -3746,7 +3764,8 @@ div.netskrafl-tile.dragging div.letterscore {
3746
3764
 
3747
3765
  .netskrafl-container div #userlist,
3748
3766
  .netskrafl-container div #elolist {
3749
- height: 396px;
3767
+ height: calc(100vh - 240px);
3768
+ height: calc(100dvh - 240px);
3750
3769
  /* 11 lines @ 36px each */
3751
3770
  overflow-y: auto;
3752
3771
  overflow-x: hidden;
@@ -3755,7 +3774,8 @@ div.netskrafl-tile.dragging div.letterscore {
3755
3774
  }
3756
3775
 
3757
3776
  .netskrafl-container div #gamelist {
3758
- height: 468px;
3777
+ height: calc(100vh - 124px);
3778
+ height: calc(100dvh - 124px);
3759
3779
  /* 13 lines @ 36px each */
3760
3780
  overflow-y: auto;
3761
3781
  overflow-x: hidden;
@@ -3764,7 +3784,8 @@ div.netskrafl-tile.dragging div.letterscore {
3764
3784
  }
3765
3785
 
3766
3786
  .netskrafl-container div #recentlist {
3767
- height: 396px;
3787
+ height: calc(100vh - 196px);
3788
+ height: calc(100dvh - 196px);
3768
3789
  /* 11 lines @ 36px each */
3769
3790
  overflow-y: auto;
3770
3791
  overflow-x: hidden;
@@ -3773,7 +3794,8 @@ div.netskrafl-tile.dragging div.letterscore {
3773
3794
  }
3774
3795
 
3775
3796
  .netskrafl-container div #usr-recent {
3776
- height: 432px;
3797
+ height: calc(100vh - 160px);
3798
+ height: calc(100dvh - 160px);
3777
3799
  /* 12 lines @ 36px each */
3778
3800
  overflow-y: auto;
3779
3801
  overflow-x: hidden;
@@ -3796,7 +3818,7 @@ div.netskrafl-tile.dragging div.letterscore {
3796
3818
  top: 0;
3797
3819
  left: 0;
3798
3820
  width: 100%;
3799
- height: 442px;
3821
+ height: 450px;
3800
3822
  background-color: var(--tab-games-background);
3801
3823
  overflow: auto;
3802
3824
  z-index: 2;
@@ -4918,10 +4940,17 @@ div.highlight1.netskrafl-blanktile {
4918
4940
 
4919
4941
  .netskrafl-container div.promo-content h2 {
4920
4942
  color: var(--ok-button);
4921
- font-size: 24px;
4922
- line-height: 30px;
4943
+ font-size: 20px;
4944
+ line-height: 26px;
4923
4945
  font-weight: bold;
4924
- margin-bottom: 20px;
4946
+ margin-bottom: 12px;
4947
+ display: flex;
4948
+ align-items: first baseline;
4949
+ gap: 6px;
4950
+ }
4951
+
4952
+ .netskrafl-container div.promo-content h2 span.glyphicon {
4953
+ flex-shrink: 0;
4925
4954
  }
4926
4955
 
4927
4956
  .netskrafl-container div.promo-krafla {
@@ -6426,14 +6455,6 @@ div.netskrafl-container input[type="checkbox"] {
6426
6455
  @media all and (max-width: 1023px) and (min-height: 632px) {
6427
6456
  /* iPhone X or taller */
6428
6457
  /* Tall mobile phones: use two lines to display the header */
6429
- .netskrafl-container div.tabbed-page {
6430
- height: 605px;
6431
- overflow: hidden;
6432
- }
6433
- .netskrafl-container div#tabs > div[role="tabpanel"],
6434
- .netskrafl-container div#main-tabs > div[role="tabpanel"] {
6435
- height: 556px;
6436
- }
6437
6458
  .netskrafl-container div.scoreleft {
6438
6459
  display: inline-block;
6439
6460
  position: relative;
@@ -6504,41 +6525,6 @@ div.netskrafl-container input[type="checkbox"] {
6504
6525
  .netskrafl-container div.board-area {
6505
6526
  top: 98px;
6506
6527
  }
6507
- .netskrafl-container div #userlist,
6508
- .netskrafl-container div #elolist {
6509
- height: 424px;
6510
- /* 14 lines @ 36px each */
6511
- }
6512
- .netskrafl-container div #gamelist {
6513
- height: 576px;
6514
- /* 16 lines @ 36px each */
6515
- }
6516
- .netskrafl-container div #recentlist {
6517
- height: 504px;
6518
- /* 14 lines @ 36px each */
6519
- }
6520
- .netskrafl-container div #usr-recent {
6521
- height: 540px;
6522
- /* 15 lines @ 36px each */
6523
- }
6524
- .netskrafl-container div #chall-sent,
6525
- .netskrafl-container div #chall-received {
6526
- height: 288px;
6527
- /* 8 lines @ 36px each */
6528
- }
6529
- .netskrafl-container div.chat-container,
6530
- .netskrafl-container div.twoletter {
6531
- height: 476px;
6532
- }
6533
- .netskrafl-container div.games {
6534
- height: 452px;
6535
- }
6536
- .netskrafl-container div.movelist-container {
6537
- height: 468px;
6538
- }
6539
- .netskrafl-container div.movelist {
6540
- height: 358px;
6541
- }
6542
6528
  }
6543
6529
 
6544
6530
  /* iPhone 11 or larger: scale the UI to appear larger on the screen */
@@ -6548,7 +6534,6 @@ div.netskrafl-container input[type="checkbox"] {
6548
6534
  ) {
6549
6535
  .netskrafl-container div.netskrafl-inner {
6550
6536
  margin-top: 4px;
6551
- height: 652px;
6552
6537
  }
6553
6538
  }
6554
6539
 
@@ -6560,13 +6545,16 @@ div.netskrafl-container input[type="checkbox"] {
6560
6545
  orientation: landscape
6561
6546
  ) {
6562
6547
  /* Mobile screen, landscape mode (width >= 667px AND landscape orientation) */
6548
+ div.netskrafl-container {
6549
+ container-type: inline-size;
6550
+ }
6563
6551
  .netskrafl-container div.netskrafl-inner {
6564
6552
  /* Reference width */
6565
6553
  width: 667px;
6566
6554
  /* Reference height */
6567
6555
  height: 100%;
6568
6556
  max-height: 686px;
6569
- overflow-y: hidden;
6557
+ overflow: visible;
6570
6558
  }
6571
6559
  .netskrafl-container div.header-logo {
6572
6560
  display: none;
@@ -6612,6 +6600,14 @@ div.netskrafl-container input[type="checkbox"] {
6612
6600
  left: 50%;
6613
6601
  width: 50%;
6614
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
+ }
6615
6611
  .netskrafl-container div.board-area {
6616
6612
  position: absolute;
6617
6613
  top: 0;
@@ -6621,6 +6617,9 @@ div.netskrafl-container input[type="checkbox"] {
6621
6617
  top: 8px;
6622
6618
  padding-top: 1px;
6623
6619
  background-color: transparent;
6620
+ transform: scale(0.92);
6621
+ transform: scale(min(1, tan(atan2(100dvh - 16px, 408px))));
6622
+ transform-origin: right top;
6624
6623
  }
6625
6624
  .netskrafl-container div.rightcol {
6626
6625
  width: 283px;
@@ -6715,7 +6714,8 @@ div.netskrafl-container input[type="checkbox"] {
6715
6714
  display: none;
6716
6715
  }
6717
6716
  .netskrafl-container div.movelist-container {
6718
- height: 300px;
6717
+ height: calc(100vh - 90px);
6718
+ height: calc(100dvh - var(--header-size, 40px) - 44px);
6719
6719
  padding-top: 0px;
6720
6720
  padding-bottom: 0px;
6721
6721
  }
@@ -6724,7 +6724,9 @@ div.netskrafl-container input[type="checkbox"] {
6724
6724
  }
6725
6725
  .netskrafl-container div.right-area.with-clock div.movelist-container {
6726
6726
  /* If in a clock game, reduce the movelist height by two lines (2 * 20px) */
6727
- height: 260px;
6727
+ height: calc(100vh - 130px);
6728
+ height: calc(100dvh - var(--header-size, 40px) - 84px);
6729
+ max-height: 260px;
6728
6730
  }
6729
6731
  .netskrafl-container div.movelist-container div.bag {
6730
6732
  display: none;
@@ -6759,7 +6761,10 @@ div.netskrafl-container input[type="checkbox"] {
6759
6761
  }
6760
6762
  .netskrafl-container div.right-area {
6761
6763
  top: 8px;
6762
- height: 316px;
6764
+ height: calc(100vh - 16px);
6765
+ height: calc(100dvh - 16px);
6766
+ max-height: 316px;
6767
+ margin-top: 0;
6763
6768
  padding-top: 0;
6764
6769
  }
6765
6770
  .netskrafl-container span.list-chall {
@@ -6776,7 +6781,29 @@ div.netskrafl-container input[type="checkbox"] {
6776
6781
  }
6777
6782
  .netskrafl-container div#tabs > div[role="tabpanel"],
6778
6783
  .netskrafl-container div#main-tabs > div[role="tabpanel"] {
6779
- 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;
6780
6807
  }
6781
6808
  .netskrafl-container div#tabs-1 span.list-ts-short,
6782
6809
  .netskrafl-container div#tabs-1 span.list-manual,
@@ -6805,17 +6832,6 @@ div.netskrafl-container input[type="checkbox"] {
6805
6832
  }
6806
6833
  }
6807
6834
 
6808
- /* Short landscape screens - scale board down slightly */
6809
-
6810
- @media all and (min-width: 667px) and (orientation: landscape) and (
6811
- max-height: 360px
6812
- ) {
6813
- .netskrafl-container div.board {
6814
- transform: scale(0.96);
6815
- transform-origin: center top;
6816
- }
6817
- }
6818
-
6819
6835
  /* ==========================================================================
6820
6836
  RESPONSIVE: Large screen (iPad and larger, 1024px+)
6821
6837
  ========================================================================== */
@@ -6876,6 +6892,25 @@ div.netskrafl-container input[type="checkbox"] {
6876
6892
  width: 1024px;
6877
6893
  height: 686px;
6878
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
+ );
6879
6914
  }
6880
6915
  .netskrafl-container div.game-container {
6881
6916
  height: 100%;
@@ -7864,7 +7899,6 @@ div.netskrafl-container input[type="checkbox"] {
7864
7899
  width: 32px;
7865
7900
  }
7866
7901
  .netskrafl-container div.tabbed-page {
7867
- overflow: hidden;
7868
7902
  left: 110px;
7869
7903
  top: 12px;
7870
7904
  width: 900px;
@@ -7887,6 +7921,7 @@ div.netskrafl-container input[type="checkbox"] {
7887
7921
  .netskrafl-container div#tabs > div[role="tabpanel"],
7888
7922
  .netskrafl-container div#main-tabs > div[role="tabpanel"] {
7889
7923
  height: 657px;
7924
+ max-height: none;
7890
7925
  top: 0;
7891
7926
  }
7892
7927
  .netskrafl-container div.userid {
@@ -8080,11 +8115,19 @@ div.netskrafl-container input[type="checkbox"] {
8080
8115
  width: 786px;
8081
8116
  height: 500px;
8082
8117
  line-height: 1.62em;
8118
+ font-size: 16px;
8119
+ display: block;
8083
8120
  }
8084
8121
  .netskrafl-container div.promo-content {
8085
- margin-top: 32px;
8086
- margin-left: 48px;
8087
- margin-right: 48px;
8122
+ margin-left: 32px;
8123
+ margin-right: 32px;
8124
+ overflow-y: visible;
8125
+ flex: none;
8126
+ }
8127
+ .netskrafl-container div.promo-content h2 {
8128
+ font-size: 26px;
8129
+ line-height: 32px;
8130
+ margin-bottom: 20px;
8088
8131
  }
8089
8132
  .netskrafl-container div.promo-fullscreen {
8090
8133
  display: block;
@@ -8092,12 +8135,28 @@ div.netskrafl-container input[type="checkbox"] {
8092
8135
  .netskrafl-container div.promo-mobile {
8093
8136
  display: none;
8094
8137
  }
8138
+ .netskrafl-container div.promo-buttons {
8139
+ display: block;
8140
+ }
8141
+ .netskrafl-container div.btn-promo-yes {
8142
+ position: absolute;
8143
+ width: 200px;
8144
+ height: 28px;
8145
+ bottom: 24px;
8146
+ right: 222px;
8147
+ top: auto;
8148
+ flex: none;
8149
+ font-size: 18px;
8150
+ }
8095
8151
  .netskrafl-container div.btn-promo-no {
8152
+ position: absolute;
8096
8153
  width: 160px;
8097
8154
  height: 28px;
8098
8155
  bottom: 24px;
8099
8156
  right: 24px;
8100
8157
  top: auto;
8158
+ flex-shrink: initial;
8159
+ font-size: 18px;
8101
8160
  background-color: var(--light-shadow);
8102
8161
  }
8103
8162
  /* Game limit dialog - fullscreen */
@@ -8147,14 +8206,17 @@ div.netskrafl-container input[type="checkbox"] {
8147
8206
  .netskrafl-container div #gamelist,
8148
8207
  .netskrafl-container div #elolist {
8149
8208
  height: 504px;
8209
+ max-height: none;
8150
8210
  /* 14 lines @ 36px each */
8151
8211
  }
8152
8212
  .netskrafl-container div #recentlist {
8153
8213
  height: 432px;
8214
+ max-height: none;
8154
8215
  /* 12 lines @ 36px each */
8155
8216
  }
8156
8217
  .netskrafl-container div #usr-recent {
8157
8218
  height: 432px;
8219
+ max-height: none;
8158
8220
  /* 12 lines @ 36px each */
8159
8221
  }
8160
8222
  .netskrafl-container div #chall-sent,