Which of the following would be NOT be an appropriate class name to use in a theme called "Blue Horizons"?

Question: Which of the following would be NOT be an appropriate class name to use in a theme called "Blue Horizons"?

  • bh-button
  • blue-horizons-header
  • button
  • bh-header

Explanation

A generic CSS selector without a theme-specific prefix is not appropriate because HubSpot requires appropriate class names and a consistent naming convention. HubSpot also recommends prefixing class selectors with the related component name so styles stay scoped and easier to maintain. In a theme called Blue Horizons, names such as bh- or blue-horizons- make the selector more specific and reduce the chance of style collisions. A bare selector like button is too broad and does not reflect a namespaced theme convention. HubSpot Developers+1

Why the other options are incorrect

A) bh-button is appropriately prefixed, so it follows a scoped naming pattern that fits a theme-specific convention. HubSpot Developers+1

B) blue-horizons-header uses the theme name as a prefix, which makes the selector descriptive and appropriately scoped. HubSpot Developers+1

D) bh-header uses a short theme-specific prefix, which is still consistent with a namespaced class naming approach. HubSpot Developers+1

Source for verification

https://developers.hubspot.com/docs/cms/marketplace/module-requirements

https://developers.hubspot.com/docs/cms/marketplace/template-policies

The answer(s) to the question is highlighted in the BOLD text above. You can also find more questions and answers related to the exams on the "HubSpot CMS for Developers II" page.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top