Skip to content

Commit

Permalink
fix(style): add link color mixin & fix misc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Jul 29, 2024
1 parent f323a12 commit af92e03
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ function Gallery(): ReactElement {
</div>
</div>

{/* Diff on height */}
{/* OK */}
<div>
<OdsButton label="ODS Button" />

<div className={ styles['gallery__my-button'] }>
<button className={ styles['gallery__my-button'] }>
My Button
</div>
</button>
</div>

{/* OK */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@

&:not(&#{$current}--disabled) {
&#{$current}--primary {
color: var(--ods-color-primary-500);

&:hover {
color: var(--ods-color-primary-700);
}

&:visited {
color: var(--ods-color-primary-800);
}
@include link.ods-link-color('primary');
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@use '../../../../../style/text';

:host(.ods-text) {
display: inline-block;
height: inherit;
}

.ods-text {
&--heading-1 {
@include text.ods-text-heading-1();
Expand Down
14 changes: 14 additions & 0 deletions packages/ods/src/style/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ $ods-link-font-weight: 600;
@include focus.ods-focus();
}
}

@mixin ods-link-color($color) {
@if $color == 'primary' {
color: var(--ods-color-primary-500);

&:hover {
color: var(--ods-color-primary-700);
}

&:visited {
color: var(--ods-color-primary-800);
}
}
}
2 changes: 1 addition & 1 deletion packages/ods/src/style/_radio.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '../../../../../style/focus';
@use './focus';

@mixin ods-radio() {
appearance: none;
Expand Down

0 comments on commit af92e03

Please sign in to comment.