rhazdon / hugo-theme-hello-friend-ng

Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing!
https://github.com/rhazdon/hugo-theme-hello-friend-ng/
Other
1.46k stars 769 forks source link

Improve styling to allow flexible overrides #399

Closed undergroundwires closed 1 year ago

undergroundwires commented 1 year ago

This commit changes targeted styling of a element to a class-based styling. This way, this is style is reusable on other elements and another <a> element can be used inside a post-item.

Otherwise, if someone would need to use <a> element in a post item, then he would get all other styles (such as display:flex) on every <a> which is unexpected.

This commit ensures that the style is abstracted from the element type itself, giving more flexibility when overriding the theme, and increases maintainability by making the intent more clear.

This would save from a potential fix like this: image To support scenarios like this: image