Skip to content

Commit 06ffacd

Browse files
committed
add styling for a ghost image gallery
1 parent 30e212b commit 06ffacd

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@deck9/tailwindcss-ghost-typography",
3-
"version": "0.0.6",
3+
"version": "0.1.0",
44
"description": "A Tailwind CSS plugin that adds styling for HTML elements served by the Ghost CMS",
55
"main": "src/index.js",
66
"repository": {

src/styles.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ module.exports = (theme) => ({
1919
background: 'none',
2020
},
2121

22+
'[class~="kg-gallery-card"]': {
23+
background: 'none',
24+
},
25+
2226
'[class~="kg-card"] a': {
2327
color: theme('colors.gray.900'),
2428
}
2529
},
2630
{
31+
// #region default-card
2732
'[class~="kg-card"]': {
2833
padding: `${theme('spacing.6')}`,
2934
borderRadius: theme('borderRadius.lg'),
@@ -40,15 +45,52 @@ module.exports = (theme) => ({
4045
'[class~="kg-card"] img': {
4146
margin: '0',
4247
},
48+
// #endregion
4349

50+
// #region image
4451
'[class~="kg-image-card"]': {
4552
textAlign: 'center',
4653
},
4754

4855
'[class~="kg-image-card"] [class~="kg-image"]': {
4956
margin: '0 auto',
5057
},
58+
// #endregion
59+
60+
// #region gallery
61+
'[class~="kg-gallery-card"]': {
62+
padding: '0',
63+
},
64+
65+
'[class~="kg-gallery-card"] figcaption': {
66+
padding: theme('spacing.3'),
67+
textAlign: 'center',
68+
fontSize: theme('fontSize.sm'),
69+
color: theme('colors.')
70+
},
71+
72+
'[class~="kg-card"] [class~="kg-gallery-container"] [class~="kg-gallery-row"]': {
73+
display: 'flex',
74+
flexWrap: 'nowrap',
75+
marginBottom: theme('spacing.4'),
76+
},
5177

78+
'[class~="kg-card"] [class~="kg-gallery-container"] [class~="kg-gallery-row"] [class~="kg-gallery-image"]': {
79+
borderRadius: theme('borderRadius.lg'),
80+
overflow: 'hidden',
81+
marginLeft: theme('spacing.2'),
82+
marginRight: theme('spacing.2'),
83+
},
84+
85+
'[class~="kg-card"] [class~="kg-gallery-container"] [class~="kg-gallery-row"] [class~="kg-gallery-image"] img': {
86+
objectPosition: "center",
87+
objectFit: "cover",
88+
height: "100%",
89+
width: "100%",
90+
},
91+
// #endregion
92+
93+
// #region embed-card
5294
'[class~="kg-card"] [class~="kg-embed-card"]': {
5395
position: 'relative',
5496
overflow: 'hidden',
@@ -65,7 +107,9 @@ module.exports = (theme) => ({
65107
right: '0',
66108
bottom: '0',
67109
},
110+
// #endregion
68111

112+
// #region bookmark
69113
'[class~="kg-card"] [class~="kg-bookmark-container"]': {
70114
display: 'flex',
71115
alignItems: 'center',
@@ -116,6 +160,7 @@ module.exports = (theme) => ({
116160
width: '100%',
117161
borderRadius: theme('borderRadius.lg'),
118162
}
163+
// #endregion
119164
}
120165
]
121166
},
@@ -147,6 +192,11 @@ module.exports = (theme) => ({
147192
margin: '0 auto',
148193
},
149194

195+
'[class~="kg-gallery-card"]': {
196+
padding: '0',
197+
background: 'transparent'
198+
},
199+
150200
'[class~="kg-card"] [class~="kg-embed-card"]': {
151201
position: 'relative',
152202
overflow: 'hidden',
@@ -231,6 +281,10 @@ module.exports = (theme) => ({
231281
background: 'none',
232282
},
233283

284+
'[class~="kg-gallery-card"]': {
285+
background: 'none',
286+
},
287+
234288
'[class~="kg-card"] a': {
235289
color: theme('colors.gray.100'),
236290
textDecoration: 'none',

0 commit comments

Comments
 (0)