Skip to content

Commit

Permalink
Support SVG images files for blockicon, blockinfo and blocklist #52
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Jan 15, 2022
1 parent 1b2f15f commit e84996c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
17 changes: 8 additions & 9 deletions src/oik-blockicon/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* oik-blockicon/style.scss */
.wp-block-oik-block-blockicon svg {
/* oik-blockicon/style.scss 0114 */
.wp-block-oik-block-blockicon svg,
.wp-block-oik-block-blockicon img {
width: 24px;
height: 24px;
fill: currentColor;
Expand All @@ -21,7 +22,7 @@


.wp-block-oik-block-blockicon.is-style-svg64 {
svg {
svg, img {
width: 64px;
height: 64px;
max-height: 64px;
Expand Down Expand Up @@ -50,7 +51,8 @@
}

@mixin sizeablesvg( $svg-size, $sizepx ) {
.wp-block-oik-block-blockicon.#{$svg-size} svg {
.wp-block-oik-block-blockicon.#{$svg-size} svg,
.wp-block-oik-block-blockicon.#{$svg-size} img {
width: $sizepx;
height: $sizepx;
}
Expand All @@ -65,7 +67,7 @@


.wp-block-oik-block-blockicon.is-style-#{$svg-size} {
svg {
svg, img {
width: $sizepx;
height: $sizepx;
max-height: $sizepx;
Expand All @@ -88,7 +90,4 @@

}
@include sizeablesvg( svg100, 100px );
@include sizeablesvg( svg150, 150px );



@include sizeablesvg( svg150, 150px );
12 changes: 6 additions & 6 deletions src/oik-blockinfo/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* oik-blockinfo/style.scss 0114 */

/* oik-blockinfo/style.scss */

.wp-block-oik-block-blockinfo svg {
.wp-block-oik-block-blockinfo svg,
.wp-block-oik-block-blockinfo img {
width: 24px;
height: 24px;
fill: currentColor;
Expand All @@ -10,7 +10,7 @@

.wp-block-oik-block-blockinfo.svg64 {

svg {
svg, img {
width: 64px;
height: 64px;
}
Expand All @@ -37,8 +37,8 @@
}


.wp-block-oik-block-blockicon .is-style-svg64 {
svg {
.wp-block-oik-block-blockicon.is-style-svg64 {
svg, img {
width: 64px;
height: 64px;
max-height: 64px;
Expand Down
5 changes: 3 additions & 2 deletions src/oik-blocklist/style.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* oik-blocklist/style.scss */
/* oik-blocklist/style.scss 0114 */
pre.wp-block-oik-block-blocklist {
font-size: 10px;
}

.wp-block-oik-block-blocklist svg {
.wp-block-oik-block-blocklist svg,
.wp-block-oik-block-blocklist img {
width: 24px;
height: 24px;
fill: currentColor;
Expand Down

0 comments on commit e84996c

Please sign in to comment.