@itwin/itwinui-css 0.54.0 → 0.54.1

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.
package/css/all.css CHANGED
@@ -583,6 +583,71 @@ html.iui-theme-dark-hc{
583
583
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
584
584
  }
585
585
 
586
+ .iui-anchor{
587
+ --_iui-anchor-external-svg:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='m16 0v5.4l-1.9-2-8.4 8.4-1.5-1.5 8.3-8.4-1.9-1.9m5.4 16v-9h-1v8h-14v-14h8v-1h-9v16z' /></svg>");
588
+ color:#008ae0;
589
+ -webkit-tap-highlight-color:rgba(0, 138, 224, 0.2);
590
+ color:var(--iui-color-foreground-primary);
591
+ -webkit-tap-highlight-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
592
+ border-radius:3px;
593
+ cursor:pointer;
594
+ text-decoration:none;
595
+ }
596
+ .iui-anchor:focus-visible{
597
+ outline:1px solid var(--iui-color-foreground-primary);
598
+ outline-offset:1px;
599
+ }
600
+ @supports not selector(*:focus-visible){
601
+ .iui-anchor:focus{
602
+ outline:1px solid var(--iui-color-foreground-primary);
603
+ outline-offset:1px;
604
+ }
605
+ }
606
+ .iui-anchor:hover{
607
+ color:#006bad;
608
+ color:var(--iui-color-foreground-primary-overlay);
609
+ }
610
+ .iui-anchor-external::after{
611
+ content:"";
612
+ display:inline-block;
613
+ width:1.5ch;
614
+ height:1.5ch;
615
+ margin-left:0.5ch;
616
+ vertical-align:-0.1ch;
617
+ background-color:currentColor;
618
+ -webkit-mask:var(--_iui-anchor-external-svg);
619
+ mask:var(--_iui-anchor-external-svg);
620
+ }
621
+ @media (forced-colors: active){
622
+ .iui-anchor-external::after{
623
+ background-color:LinkText;
624
+ }
625
+ }
626
+ .iui-anchor:hover{
627
+ text-decoration:underline;
628
+ }
629
+ @media (prefers-contrast: more){
630
+ .iui-anchor{
631
+ text-decoration:underline;
632
+ }
633
+ .iui-anchor:hover{
634
+ text-decoration:none;
635
+ }
636
+ }
637
+ .iui-theme-light .iui-anchor, .iui-theme-dark .iui-anchor{
638
+ text-decoration:none;
639
+ }
640
+ .iui-theme-light .iui-anchor:hover, .iui-theme-dark .iui-anchor:hover{
641
+ text-decoration:underline;
642
+ }
643
+
644
+ .iui-theme-light-hc .iui-anchor, .iui-theme-dark-hc .iui-anchor{
645
+ text-decoration:underline;
646
+ }
647
+ .iui-theme-light-hc .iui-anchor:hover, .iui-theme-dark-hc .iui-anchor:hover{
648
+ text-decoration:none;
649
+ }
650
+
586
651
  [class*=iui-],
587
652
  [class*=iui-] *{
588
653
  scrollbar-color:rgba(0, 0, 0, 0.4) transparent;
package/css/global.css CHANGED
@@ -582,6 +582,71 @@ html.iui-theme-dark-hc{
582
582
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
583
583
  }
584
584
 
585
+ .iui-anchor{
586
+ --_iui-anchor-external-svg:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='m16 0v5.4l-1.9-2-8.4 8.4-1.5-1.5 8.3-8.4-1.9-1.9m5.4 16v-9h-1v8h-14v-14h8v-1h-9v16z' /></svg>");
587
+ color:#008ae0;
588
+ -webkit-tap-highlight-color:rgba(0, 138, 224, 0.2);
589
+ color:var(--iui-color-foreground-primary);
590
+ -webkit-tap-highlight-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
591
+ border-radius:3px;
592
+ cursor:pointer;
593
+ text-decoration:none;
594
+ }
595
+ .iui-anchor:focus-visible{
596
+ outline:1px solid var(--iui-color-foreground-primary);
597
+ outline-offset:1px;
598
+ }
599
+ @supports not selector(*:focus-visible){
600
+ .iui-anchor:focus{
601
+ outline:1px solid var(--iui-color-foreground-primary);
602
+ outline-offset:1px;
603
+ }
604
+ }
605
+ .iui-anchor:hover{
606
+ color:#006bad;
607
+ color:var(--iui-color-foreground-primary-overlay);
608
+ }
609
+ .iui-anchor-external::after{
610
+ content:"";
611
+ display:inline-block;
612
+ width:1.5ch;
613
+ height:1.5ch;
614
+ margin-left:0.5ch;
615
+ vertical-align:-0.1ch;
616
+ background-color:currentColor;
617
+ -webkit-mask:var(--_iui-anchor-external-svg);
618
+ mask:var(--_iui-anchor-external-svg);
619
+ }
620
+ @media (forced-colors: active){
621
+ .iui-anchor-external::after{
622
+ background-color:LinkText;
623
+ }
624
+ }
625
+ .iui-anchor:hover{
626
+ text-decoration:underline;
627
+ }
628
+ @media (prefers-contrast: more){
629
+ .iui-anchor{
630
+ text-decoration:underline;
631
+ }
632
+ .iui-anchor:hover{
633
+ text-decoration:none;
634
+ }
635
+ }
636
+ .iui-theme-light .iui-anchor, .iui-theme-dark .iui-anchor{
637
+ text-decoration:none;
638
+ }
639
+ .iui-theme-light .iui-anchor:hover, .iui-theme-dark .iui-anchor:hover{
640
+ text-decoration:underline;
641
+ }
642
+
643
+ .iui-theme-light-hc .iui-anchor, .iui-theme-dark-hc .iui-anchor{
644
+ text-decoration:underline;
645
+ }
646
+ .iui-theme-light-hc .iui-anchor:hover, .iui-theme-dark-hc .iui-anchor:hover{
647
+ text-decoration:none;
648
+ }
649
+
585
650
  [class*=iui-],
586
651
  [class*=iui-] *{
587
652
  scrollbar-color:rgba(0, 0, 0, 0.4) transparent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-css",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "src/index.scss",
@@ -1,79 +1,3 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
-
5
- @mixin iui-anchor {
6
- --_iui-anchor-external-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='m16 0v5.4l-1.9-2-8.4 8.4-1.5-1.5 8.3-8.4-1.9-1.9m5.4 16v-9h-1v8h-14v-14h8v-1h-9v16z' /></svg>");
7
-
8
- @include iui-anchor-status('primary');
9
- border-radius: $iui-border-radius;
10
- cursor: pointer;
11
-
12
- &-external::after {
13
- content: '';
14
- display: inline-block;
15
- width: 1.5ch;
16
- height: 1.5ch;
17
- margin-left: 0.5ch;
18
- vertical-align: -0.1ch;
19
- background-color: currentColor;
20
- mask: var(--_iui-anchor-external-svg);
21
- @media (forced-colors: active) {
22
- background-color: LinkText;
23
- }
24
- }
25
-
26
- @include iui-anchor-underline('on-hover');
27
-
28
- @media (prefers-contrast: more) {
29
- @include iui-anchor-underline('on-initial');
30
- }
31
-
32
- @at-root {
33
- .iui-theme-light &,
34
- .iui-theme-dark & {
35
- @include iui-anchor-underline('on-hover');
36
- }
37
- }
38
-
39
- @at-root {
40
- .iui-theme-light-hc &,
41
- .iui-theme-dark-hc & {
42
- @include iui-anchor-underline('on-initial');
43
- }
44
- }
45
- }
46
-
47
- @mixin iui-anchor-status($status: primary) {
48
- @include iui-focus($color: var(--iui-color-foreground-#{$status}), $offset: 1px);
49
- @include themed {
50
- color: t(iui-color-foreground-#{$status});
51
- -webkit-tap-highlight-color: rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-5));
52
- }
53
- @if $status != primary {
54
- @include iui-text-selection($status);
55
- }
56
-
57
- &:hover {
58
- @include themed {
59
- color: t(iui-color-foreground-#{$status}-overlay);
60
- }
61
- }
62
- }
63
-
64
- /// $behavior should be one of: 'on-hover' or 'on-initial'
65
- @mixin iui-anchor-underline($behavior: 'on-hover') {
66
- @if $behavior == 'on-hover' {
67
- text-decoration: none;
68
-
69
- &:hover {
70
- text-decoration: underline;
71
- }
72
- } @else {
73
- text-decoration: underline;
74
-
75
- &:hover {
76
- text-decoration: none;
77
- }
78
- }
79
- }
3
+ @import '../style/anchor'; // Reimports anchor from global styles
@@ -0,0 +1,79 @@
1
+ // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
+ // See LICENSE.md in the project root for license terms and full copyright notice.
3
+ @import './index';
4
+
5
+ @mixin iui-anchor {
6
+ --_iui-anchor-external-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='m16 0v5.4l-1.9-2-8.4 8.4-1.5-1.5 8.3-8.4-1.9-1.9m5.4 16v-9h-1v8h-14v-14h8v-1h-9v16z' /></svg>");
7
+
8
+ @include iui-anchor-status('primary');
9
+ border-radius: $iui-border-radius;
10
+ cursor: pointer;
11
+
12
+ &-external::after {
13
+ content: '';
14
+ display: inline-block;
15
+ width: 1.5ch;
16
+ height: 1.5ch;
17
+ margin-left: 0.5ch;
18
+ vertical-align: -0.1ch;
19
+ background-color: currentColor;
20
+ mask: var(--_iui-anchor-external-svg);
21
+ @media (forced-colors: active) {
22
+ background-color: LinkText;
23
+ }
24
+ }
25
+
26
+ @include iui-anchor-underline('on-hover');
27
+
28
+ @media (prefers-contrast: more) {
29
+ @include iui-anchor-underline('on-initial');
30
+ }
31
+
32
+ @at-root {
33
+ .iui-theme-light &,
34
+ .iui-theme-dark & {
35
+ @include iui-anchor-underline('on-hover');
36
+ }
37
+ }
38
+
39
+ @at-root {
40
+ .iui-theme-light-hc &,
41
+ .iui-theme-dark-hc & {
42
+ @include iui-anchor-underline('on-initial');
43
+ }
44
+ }
45
+ }
46
+
47
+ @mixin iui-anchor-status($status: primary) {
48
+ @include iui-focus($color: var(--iui-color-foreground-#{$status}), $offset: 1px);
49
+ @include themed {
50
+ color: t(iui-color-foreground-#{$status});
51
+ -webkit-tap-highlight-color: rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-5));
52
+ }
53
+ @if $status != primary {
54
+ @include iui-text-selection($status);
55
+ }
56
+
57
+ &:hover {
58
+ @include themed {
59
+ color: t(iui-color-foreground-#{$status}-overlay);
60
+ }
61
+ }
62
+ }
63
+
64
+ /// $behavior should be one of: 'on-hover' or 'on-initial'
65
+ @mixin iui-anchor-underline($behavior: 'on-hover') {
66
+ @if $behavior == 'on-hover' {
67
+ text-decoration: none;
68
+
69
+ &:hover {
70
+ text-decoration: underline;
71
+ }
72
+ } @else {
73
+ text-decoration: underline;
74
+
75
+ &:hover {
76
+ text-decoration: none;
77
+ }
78
+ }
79
+ }
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './index';
4
+ @import './anchor';
4
5
 
5
6
  html {
6
7
  @include theme-variables(light);
@@ -51,6 +52,10 @@ html {
51
52
  }
52
53
  }
53
54
 
55
+ .iui-anchor {
56
+ @include iui-anchor;
57
+ }
58
+
54
59
  [class*='iui-'],
55
60
  [class*='iui-'] * {
56
61
  // Text highlight