Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc-toggle displays extra margin when inside a grid and when inline #896

Closed
pdesoyres-cc opened this issue Nov 30, 2023 · 0 comments · Fixed by #897 or #876
Closed

cc-toggle displays extra margin when inside a grid and when inline #896

pdesoyres-cc opened this issue Nov 30, 2023 · 0 comments · Fixed by #897 or #876
Assignees
Labels
bug Something isn't working

Comments

@pdesoyres-cc
Copy link
Contributor

pdesoyres-cc commented Nov 30, 2023

When a <cc-toggle> with an inlined label is inside a gride area, an extra margin is displayed on top of it.

image

<div class="grid">
  <div class="area1"><cc-toggle inline legend="legend" choices='[{ "label": "on", "value": "on" },{ "label": "off", "value": "off" }]'></cc-toggle></div>
  <div class="area2">area 2</div>
  <div class="area3">area 3</div>
</div>
.grid {
  display: grid;
  grid-template-areas:
            'area1 area3'
            'area2 area3';
  grid-template-columns: 250px 1fr;
  grid-template-rows: max-content 1fr;
  gap: 1em;
}

.area1 {
  grid-area: area1;
  background-color: indianred;
}
.area2 {
  grid-area: area2;
  background-color: steelblue;
}
.area3 {
  grid-area: area3;
  background-color: darkseagreen;
}
@pdesoyres-cc pdesoyres-cc added the bug Something isn't working label Nov 30, 2023
@pdesoyres-cc pdesoyres-cc self-assigned this Nov 30, 2023
pdesoyres-cc added a commit that referenced this issue Nov 30, 2023
pdesoyres-cc added a commit that referenced this issue Dec 5, 2023
pdesoyres-cc added a commit that referenced this issue Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant