Down with inline styles
-
The inline styles (e.g.
style="display: block"
) hinder custom CSS coding. Instead, classes should be used (e.g.class="showsmoothscrollup"
) and a corresponding<style>
should be added to the<head>
(ideally before the theme stylesheet, so the stylesheet can easily overwrite the plugin’s<style>
. Ideally, all of the styles (Pill, Tab, Text) should be done this way. The exact same effects that each of these produce can be achieved this way, allowing far easier customization.Otherwise, minimally there should be a “Custom CSS” or “No in-line styles” option included in the same dropdown as the Pill, Tab and Text options. With this option selected, there shouldn’t even be a
<style>
added to the head—there should only be the class change made when the viewer scrolls down to the set point of the page (e.g.class="hidesmoothscrollup"
changes toclass="showsmoothscrollup"
). All the CSS coding would then be up to the web developer installing the plugin, making it 100% customizable with—no need to fiddle with trying to override CSS—and would allow for much cleaner code.That’s my suggestion for this plugin. Hope it helps. :j
- The topic ‘Down with inline styles’ is closed to new replies.