Skip to content

Commit

Permalink
Merge pull request #14 from deroceratops/fix_issue13
Browse files Browse the repository at this point in the history
Make elements styled with the class 'shadow-neu' adjust the shadow based on CSS pseudo classes.
  • Loading branch information
itsMarcoSolis authored Aug 27, 2024
2 parents 262db07 + 3661251 commit 5f82a1c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ module.exports = {
boxShadow: `8px 8px 0 0 ${color}`,
transition: 'box-shadow 0.2s ease-in-out',
},
'&:active': {
boxShadow: `4px 4px 0 0 ${color}`,
transition: 'box-shadow 0.2s ease-in-out',
},
'&:focus': {
boxShadow: `4px 4px 0 0 ${color}`,
transition: 'box-shadow 0.2s ease-in-out',
}
};
boxShadowUtilities[`.${e(`shadow-neu-active-${colorName}`)}`] = {
boxShadow: `4px 4px 0 0 ${color}`,
Expand All @@ -48,6 +56,14 @@ module.exports = {
boxShadow: `8px 8px 0 0 ${color[shade]}`,
transition: 'box-shadow 0.2s ease-in-out',
},
'&:active': {
boxShadow: `4px 4px 0 0 ${color}`,
transition: 'box-shadow 0.2s ease-in-out',
},
'&:focus': {
boxShadow: `4px 4px 0 0 ${color}`,
transition: 'box-shadow 0.2s ease-in-out',
}
};
boxShadowUtilities[`.${e(`shadow-neu-active-${colorName}-${shade}`)}`] = {
boxShadow: `4px 4px 0 0 ${color[shade]}`,
Expand Down

0 comments on commit 5f82a1c

Please sign in to comment.