Title: Down with inline styles
Last modified: August 21, 2016

---

# Down with inline styles

 *  [Joe Rhoney](https://wordpress.org/support/users/joerhoney/)
 * (@joerhoney)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/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 to `class="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
 * [https://wordpress.org/plugins/smooth-scroll-up/](https://wordpress.org/plugins/smooth-scroll-up/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Konstantinos Kouratoras](https://wordpress.org/support/users/kouratoras/)
 * (@kouratoras)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/down-with-inline-styles/#post-5056315)
 * Hi!
 * I just released 0.8 version with some code changes.
 * The inline styles were replaced by one css and the according class for each situation,
   in order to reduce css files and remove all inline styles. I think it’s better
   this way now and it allows easier customization.
 * Take a look, any feedback would be really appreciated.
 * If you’re satisfied with that, you could change the 4-star rating to 5-star here:
 * [http://wordpress.org/support/topic/easy-scroll-to-top-solution](http://wordpress.org/support/topic/easy-scroll-to-top-solution)
 * 🙂
 *  Thread Starter [Joe Rhoney](https://wordpress.org/support/users/joerhoney/)
 * (@joerhoney)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/down-with-inline-styles/#post-5056316)
 * I like the improvements you’ve made, it’s much better. You’re still using inline
   styles though, and these could be replaced with classes as well. Your JavaScript
   would just need to be modified to change classes instead of styles. That might
   be a big change though and I don’t know if all of your users would want that,
   which is why I recommended a new Custom CSS option. It would do nothing more 
   than change the class when you scroll down to that certain point on the page.
 * Also, just a suggestion (although it wouldn’t change my rating) consider writing
   your CSS selectors for the different button types like `a.scrollup-pill` instead
   of `.scrollup-pill`. The added `a` will make it more specific, thereby preventing
   a simple `a{color:#006;}` from overriding your text color (which would be likely
   to happen frequently). CSS coders will still be able to easily customize the 
   text color, but won’t be forced to do so. I imagine a lot of your users are now
   finding that your scrollup buttons are using their website’s default link text
   colors instead of your packaged stylesheet’s link text colors as they were before
   you made this recent update.
 * Hope that helps!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Down with inline styles’ is closed to new replies.

 * ![](https://ps.w.org/smooth-scroll-up/assets/icon-256x256.png?rev=974000)
 * [Smooth Scroll Up](https://wordpress.org/plugins/smooth-scroll-up/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smooth-scroll-up/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smooth-scroll-up/)
 * [Active Topics](https://wordpress.org/support/plugin/smooth-scroll-up/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smooth-scroll-up/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smooth-scroll-up/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [inline styles](https://wordpress.org/support/topic-tag/inline-styles/)

 * 2 replies
 * 2 participants
 * Last reply from: [Joe Rhoney](https://wordpress.org/support/users/joerhoney/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/down-with-inline-styles/#post-5056316)
 * Status: not resolved