Fork me on GitHub

Slide Down Toolbar  Bottom

  • I've developed my own slide down toolbar at the top of my theme using CSS and javascript. Now I want to use the same toolbar in other themes, but I am finding that many themes break the layout of the toolbar because of styling issues. The toolbar has its own styles and I made them specific enough to hopefully avoid this problem. However, it seems to be a problem anyway, and I imagine it will continue to be a problem unless I find a better way to do this.

    The toolbar will always look the same, regardless of what theme it is in. So now I am trying to think of a better way to handle this, instead of putting the code at the top of the body in the theme templates. Two ideas come to mind -- a custom block and a custom plugin. Even so, they would be used in various themes and could potentially continue to be a styling problem.

    I'm fishing for suggestions on the best way to handle this. Any ideas?
  • If the CSS file for your toolbar is loaded last, does that solve the problem?

    I've wondered if there should be a custom ordering to the PageUtil::addVar function
  • It already is the last one to load. Nice try though. icon_cool
  • The crazy idea that comes to my mind is:
    a margin top to the body, and put the bar there icon_razz

    Should try, anyways, an absolute positioned bar,
    collapsible to a side,
    could be enough, to be a superimposed bar over the first 30px? of the theme,
    and collapse it if not needed...

    and if you need help, don't hesitate to PM me,
    I love that stuff icon_wink
    Just my 0.02

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Well, basically, that's what I have done. I was just thinking maybe it would be better to somehow use it in a plugin or block instead, so it would be more portable for other themes. But I am still trying to decide the best way, hence my post here.

    The biggest issue is conflicting styles, obviously. If I could have the toolbar call one CSS and ignore the main theme's CSS, that would be the best bet. But how to implement that is the main issue.
  • Ah, I though you already defined a pretty specific style,
    like a DIV#my_pretty_specific_bar_wrapper icon_razz

    Rules from the theme can be avoided using a simple markup
    and the hard work is to override any rule for the elements in use.

    The plugin and the separated stylesheet is a must, for me.

    --
    - Mateo T. -
    Mis principios... son mis fines
  • I wish there was a CSS 'command' like:

    Code

    #mydiv {
        formatting: default;
    }


    then you could remove all previous formatting done to an object. would be sweet.
  • Hehehehe
    Exactly a feature request for the CSScaffold ticket!
    Please log a comment with that sweet thing! icon_wink

    --
    - Mateo T. -
    Mis principios... son mis fines
  • 0 users

This list is based on users active over the last 60 minutes.