pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
74 lines (63 loc) • 1.57 kB
text/less
.common-card {
width: 18rem;
height: 20rem;
border-radius: 0.5rem;
border: 1px solid var(--pxt-neutral-stencil1);
transition: border 0.1s ease;
position: relative;
overflow: hidden;
.common-card-body {
border-radius: 0.5rem;
}
.common-card-action {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
z-index: 1;
border: none;
padding: 0;
margin: 0;
background: transparent;
color: transparent;
cursor: pointer;
&:focus-visible {
outline: 2px solid var(--pxt-focus-border, Highlight);
outline-offset: -2px;
border-radius: 0.5rem;
}
}
}
.common-card:has(.common-card-action) {
cursor: pointer;
&:hover {
border: 1px solid var(--pxt-focus-border);
}
}
.common-card-label {
color: var(--pxt-primary-foreground);
background-color: var(--pxt-primary-background);
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
position: absolute;
top: 1rem;
right: -1rem;
padding: 0.5rem 0.5rem 0.25rem 0.5rem;
min-width: 5rem;
font-size: 16px;
border-color: var(--pxt-primary-accent);
}
.common-card-label::after {
position: absolute;
content: "";
top: 100%;
left: auto;
right: 0;
background-color: transparent;
border-color: transparent;
border-style: solid;
border-width: 1.2em 1.2em 0 0;
border-top-color: inherit;
width: 0;
height: 0;
}