So, I'd like to think that I've improved the Custom Heading, and I hope you will agree!
I've rewritten a bunch of the component code so that it matches our updated Mm Component structure (i.e. using the $defaults array, checking whether class options have been added to minimize extra spaces, etc.).
After much pain, I figured out how to wrap the heading in a link when one is passed. No pain, no gain, right?
I thought passing an array of allowed pixel values seemed really weird for a Custom Heading, so I decided to make that an arbitrary value that the user can pass, so it works just like the margin bottom. If no value is passed, it inherits the size of the heading from the theme.
The Sass is so simple for this because I was able to utilize so many of our helpful global text styles, and the rest of the formatting can be handled by the theme's styling.
I'm looking forward to seeing if there are any further improvements to be made.
So, I'd like to think that I've improved the Custom Heading, and I hope you will agree!
I've rewritten a bunch of the component code so that it matches our updated Mm Component structure (i.e. using the
$defaults
array, checking whether class options have been added to minimize extra spaces, etc.).After much pain, I figured out how to wrap the heading in a link when one is passed. No pain, no gain, right?
I thought passing an array of allowed pixel values seemed really weird for a Custom Heading, so I decided to make that an arbitrary value that the user can pass, so it works just like the margin bottom. If no value is passed, it inherits the size of the heading from the theme.
The Sass is so simple for this because I was able to utilize so many of our helpful global text styles, and the rest of the formatting can be handled by the theme's styling.
I'm looking forward to seeing if there are any further improvements to be made.