Skip to content

Commit

Permalink
Merge pull request #57 from markteekman/develop
Browse files Browse the repository at this point in the history
Small refactor of `Feature` component due to bug in Safari
  • Loading branch information
markteekman committed Mar 27, 2023
2 parents 7216dcb + cc48a9f commit d4376b6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "accessible-astro-starter",
"description": "An Accessible Starter Theme for Astro including several accessiblity features and tools to help you build faster.",
"version": "2.0.1",
"version": "2.0.2",
"author": "Mark Teekman",
"homepage": "https://accessible-astro.dev",
"scripts": {
Expand Down
30 changes: 22 additions & 8 deletions src/components/Feature.astro
Expand Up @@ -19,24 +19,38 @@ const { icon = 'mdi:rocket', title = 'Title' } = Astro.props

.feature {
position: relative;
padding: 2rem;
width: calc(100% - 0.5rem);
background-color: var(--neutral-100);
border: 3px solid var(--neutral-700);
border-radius: 1rem;
box-shadow: 0 0 0 6px var(--neutral-100);
padding: 2rem;

> * {
position: relative;
z-index: 2;
}

@include breakpoint(large) {
width: 100%;
}

&::before,
&::after {
content: '';
position: absolute;
z-index: -1;
}

&::before {
inset: 0;
background-color: var(--neutral-100);
border: 3px solid var(--neutral-700);
border-radius: 1rem;
box-shadow: 0 0 0 6px var(--neutral-100);
z-index: 1;
}

&::after {
background-color: var(--action-color);
inset: 1rem -1rem -1rem 1rem;
inset: 1rem -0.85rem -0.85rem 1rem;
border-radius: 1rem;
z-index: 0;
}
}

Expand All @@ -45,7 +59,7 @@ const { icon = 'mdi:rocket', title = 'Title' } = Astro.props
color: var(--action-color);
}

:global(.darkmode .feature) {
:global(.darkmode .feature::before) {
background-color: var(--dark-100);
box-shadow: 0 0 0 6px var(--dark-100);
}
Expand Down

0 comments on commit d4376b6

Please sign in to comment.