Skip to content

Commit

Permalink
Remove the iui-anchor mixin. (#1915)
Browse files Browse the repository at this point in the history
Co-authored-by: Mayank <[email protected]>
  • Loading branch information
Ben-Pusey-Bentley and mayank99 authored Mar 19, 2024
1 parent 3c5552f commit 210e83a
Show file tree
Hide file tree
Showing 20 changed files with 201 additions and 132 deletions.
11 changes: 11 additions & 0 deletions .changeset/green-cheetahs-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@itwin/itwinui-css": minor
---

`iui-anchor` can now be styled with status colors using a new `data-iui-status` attribute.

```html
<a class="iui-anchor" data-iui-status="negative">...</a>
```

Possible values include: `"positive"`, `"negative"`, `"informational"`, and `"warning"`.
34 changes: 34 additions & 0 deletions .changeset/lemon-avocados-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
"@itwin/itwinui-css": major
---

`iui-anchor` must now be explicitly added to `<a>` elements, in addition to the previous `iui-alert-link`, `iui-breadcrumbs-content`, `iui-tag-basic`, and `iui-toast-anchor` classes.

```diff
-<a class="iui-alert-link">
+<a class="iui-anchor iui-alert-link">
```

```diff
-<a class="iui-breadcrumbs-content">
+<a class="iui-anchor iui-breadcrumbs-content">
```

```diff
-<a class="iui-tag-basic">
+<a class="iui-anchor iui-tag-basic">
```

```diff
-<a class="iui-toast-anchor">
+<a class="iui-anchor iui-toast-anchor">
```

Additionally, all `<a>` elements within `iui-legal-footer` elements will need the `iui-anchor` class.

```diff
<li class="iui-legal-footer-item">
- <a>...</a>
+ <a class="iui-anchor>...</a>
</li>
```
24 changes: 18 additions & 6 deletions apps/css-workshop/pages/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ <h1>Alert</h1>
></svg-info-circular>
<span class="iui-alert-message">Informational message.
<a
class="iui-alert-link"
class="iui-anchor iui-alert-link"
href="#"
data-iui-underline="true"
data-iui-status="informational"
>Learn more</a>
</span>
<button
Expand Down Expand Up @@ -96,8 +98,10 @@ <h1>Alert</h1>
></svg-status-success>
<span class="iui-alert-message">Positive message.
<a
class="iui-alert-link"
class="iui-anchor iui-alert-link"
href="#"
data-iui-underline="true"
data-iui-status="positive"
>Learn more</a>
</span>
<button
Expand Down Expand Up @@ -125,8 +129,10 @@ <h1>Alert</h1>
></svg-status-warning>
<span class="iui-alert-message">Warning message.
<a
class="iui-alert-link"
class="iui-anchor iui-alert-link"
href="#"
data-iui-underline="true"
data-iui-status="warning"
>Learn more</a>
</span>
<button
Expand Down Expand Up @@ -155,8 +161,10 @@ <h1>Alert</h1>
></svg-status-error>
<span class="iui-alert-message">Negative message.
<a
class="iui-alert-link"
class="iui-anchor iui-alert-link"
href="#"
data-iui-underline="true"
data-iui-status="negative"
>Learn more</a>
</span>
<button
Expand Down Expand Up @@ -190,8 +198,10 @@ <h1>Alert</h1>
est
laborum.
<a
class="iui-alert-link"
class="iui-anchor iui-alert-link"
href="#"
data-iui-underline="true"
data-iui-status="informational"
>Learn more</a>
</span>
<button
Expand Down Expand Up @@ -224,8 +234,10 @@ <h1>Alert</h1>
></svg-info-circular>
<span class="iui-alert-message">This is a sticky alert.
<a
class="iui-alert-link"
class="iui-anchor iui-alert-link"
href="#"
data-iui-status="informational"
data-iui-underline="true"
>Learn more</a>
</span>
<button
Expand Down
6 changes: 3 additions & 3 deletions apps/css-workshop/pages/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h2>Breadcrumbs anchor</h2>
<ol class="iui-breadcrumbs-list">
<li class="iui-breadcrumbs-item">
<a
class="iui-breadcrumbs-content"
class="iui-anchor iui-breadcrumbs-content"
href="#"
>
Root
Expand All @@ -90,7 +90,7 @@ <h2>Breadcrumbs anchor</h2>
</li>
<li class="iui-breadcrumbs-item">
<a
class="iui-breadcrumbs-content"
class="iui-anchor iui-breadcrumbs-content"
href="#"
id="test-1"
>
Expand All @@ -105,7 +105,7 @@ <h2>Breadcrumbs anchor</h2>
</li>
<li class="iui-breadcrumbs-item">
<a
class="iui-breadcrumbs-content"
class="iui-anchor iui-breadcrumbs-content"
href="#"
id="test-2"
>
Expand Down
5 changes: 5 additions & 0 deletions apps/css-workshop/pages/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ <h1>Footer</h1>
href="https://connect-agreementportal.bentley.com/AgreementApp/Home/Eula/view/readonly/BentleyConnect"
target="_blank"
id="test-link-1"
class="iui-anchor"
>
Terms of service
</a>
Expand All @@ -66,6 +67,7 @@ <h1>Footer</h1>
href="https://www.bentley.com/en/privacy-policy"
target="_blank"
id="test-link-2"
class="iui-anchor"
>
Privacy
</a>
Expand All @@ -75,6 +77,7 @@ <h1>Footer</h1>
<a
href="https://www.bentley.com/en/terms-of-use-and-select-online-agreement"
target="_blank"
class="iui-anchor"
>
Terms of use
</a>
Expand All @@ -84,6 +87,7 @@ <h1>Footer</h1>
<a
href="https://www.bentley.com/en/cookie-policy"
target="_blank"
class="iui-anchor"
>
Cookies
</a>
Expand All @@ -93,6 +97,7 @@ <h1>Footer</h1>
<a
href="https://connect.bentley.com/Legal"
target="_blank"
class="iui-anchor"
>
Legal notices
</a>
Expand Down
48 changes: 24 additions & 24 deletions apps/css-workshop/pages/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -733,38 +733,38 @@ <h2>Basic tag containers</h2>
<div class="iui-tag-container">
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
id="test-tag-3"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
Expand Down Expand Up @@ -797,110 +797,110 @@ <h2>Truncate basic tag containers</h2>
<div class="iui-tag-container iui-truncate">
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
id="test-tag-3"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
tags
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
go
</a>
<a
href="#"
class="iui-tag-basic"
class="iui-anchor iui-tag-basic"
>
here
</a>
Expand Down
Loading

0 comments on commit 210e83a

Please sign in to comment.