acf-swatch icon indicating copy to clipboard operation
acf-swatch copied to clipboard

Add hide label option

Open reformatco opened this issue 6 years ago • 2 comments

Allows you to then use the label to generate a class in a template

reformatco avatar Jan 23 '19 17:01 reformatco

@madebyreformat can you provide some more information in this PR about what it accomplishes? Screenshots welcomed.

Also ideally all new features are also added for 4.x version too.

Thanks

nickforddev avatar Jan 24 '19 02:01 nickforddev

It allows you to toggle showing the label in the admin panel, this is so you can use the label within a theme to specify a class generally as a variable.

I looked at adding a third element to the options array but im not sure its possible after a quick scan of the ACF workings, looks like it's only expecting two items after splitting on the colon

eg. can't add #ff0000 : class-red : Red

I really like the plugin but don't want to add inline styles within the markup so wanted to toggle classes instead.

I tweaked the CSS for the swatch-toggle if it is selected just to make it a bit bigger too, see below:

screenshot 2019-01-24 at 11 53 25

reformatco avatar Jan 24 '19 11:01 reformatco