Skip to content

Commit

Permalink
MALIN-635 fix: no width change on weight change
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaanesen committed Jan 16, 2024
1 parent fc50e71 commit 4f54a72
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miljodirektoratet/md-css",
"version": "1.0.26",
"version": "1.0.27",
"description": "CSS for Miljødirektoratet",
"author": "Miljødirektoratet",
"main": "./src/index.css",
Expand Down
15 changes: 15 additions & 0 deletions packages/css/src/tabs/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,28 @@
}

.md-tabs-container ul li .md-tabs-button {
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: space-between;

font-size: 1em;
font-weight: 400;
padding: 13px 24px 12px 24px;
border: 0;
background-color: transparent;
border-bottom: 1px solid var(--mdGreyColor80);
}
.md-tabs-container ul li .md-tabs-button::after {
content: attr(data-text);
content: attr(data-text) / '';
height: 0;
visibility: hidden;
overflow: hidden;
user-select: none;
pointer-events: none;
font-weight: 600;
}

.md-tabs-container ul li .md-tabs-button.md-tabs-button--disabled {
background-color: var(--mdGreyColor20);
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miljodirektoratet/md-react",
"version": "1.0.47",
"version": "1.0.48",
"description": "React-komponenter for Miljødirektoratet",
"author": "Miljødirektoratet",
"main": "./dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/tabs/MdTabTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const MdTabTitle: React.FunctionComponent<MdTabTitleProps> = ({
return !disabled && setSelectedTab(index);
}}
tabIndex={disabled ? -1 : 0}
data-text={title}
>
{title}
</button>
Expand Down

0 comments on commit 4f54a72

Please sign in to comment.