Skip to content

Commit

Permalink
Merge pull request #26 from kodai3/improve-boxsizing-usage
Browse files Browse the repository at this point in the history
fix: 🐛 prefer border-box
  • Loading branch information
takanorip authored Mar 13, 2024
2 parents 33d33f8 + 5063285 commit 65b98c9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/Accordion/Accordion.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
.container,
.container * {
box-sizing: border-box;
}

.button {
box-sizing: content-box;
display: flex;
align-items: center;
justify-content: space-between;
color: var(--color-text-main);
background: none;
border: 1px solid var(--color-border);
cursor: pointer;
width: auto;
}

.button:hover {
Expand All @@ -19,16 +24,16 @@
}

.medium .button {
width: calc(100% - 2rem - 2px);
min-height: calc(2rem - 2px);
width: 100%;
min-height: 2rem;
padding: var(--size-spacing-md);
font-weight: bold;
border-radius: var(--radius-md);
}

.small .button {
width: calc(100% - 1rem);
min-height: calc(1.5rem - 2px);
width: 100%;
min-height: 1.5rem;
padding: var(--size-spacing-xs);
font-size: var(--text-button-md-size);
border-right: none;
Expand Down

0 comments on commit 65b98c9

Please sign in to comment.