GetSimple Support Forum

Full Version: Dynamically created Class Names
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am working on a GS theme. I'd like to know if there are any dynamic class names generated in GS i should be aware of, so that i can style them from the default css file.
Thanks!
designthing Wrote:I am working on a GS theme. I'd like to know if there are any dynamic class names generated in GS i should be aware of, so that i can style them from the default css file.
Thanks!

Besides those class names you specify in your theme, CSS classes can only result from functions outputting HTML. As far as I know, for the GetSimple Core this is only
  • get_navigation: the <li> get the slug of the page, the slug of the parent, and "current", if the page is the current page

As far as plugins go, most plugins outputting content in the frontend, use CSS classes, e.g.
  • I18N - get_i18n_navigation: like get_navigation + "open"/"closed" + "currentpath"
  • I18N Search - get_search_results: "search-result", "search-entry", "search-entry-title", ...
  • I18N Gallery: "gallery", "gallery-<type>", "gallery-<name>", "gallery-thumb", ...
  • ...

Some plugins provide no CSS styles at all (e.g. I18N), others include default CSS styles (e.g. I18N gallery), which can be overridden.
I suppose, you must support the Core get_navigation, but you might also support other plugins by providing custom styles and describe your theme as "ready for plugins: ...".
You can use per slug classes with <element id/class = "<?php get_page_slug(); ?>"> </element>
You can then specify e.g. background of the page in <body id="slug">