Skip to:
Content
Pages
Categories
Search
Top
Bottom

New Help With Styling CSS to Complete New Plugin | BuddyPress Activity Stream Bar

  • @xberserker

    Participant

    I need to do some other minor things. But the main thing right now is the CSS. I just want it to have all the all the following.

    But for some reason it’s also styling the main activity stream on the regular buddypress site. This is what I’d like it to do:

    `#bp_activity_bar ul,li{font-size:10px;font-family:Tahoma;list-style:none;font-weight:700;color:#DDD;margin:0;padding:0;}

    A:link,A:visited,A:active,A:hover,img{color:#DDD;border:0;}`

Viewing 24 replies - 1 through 24 (of 24 total)
  • @hnla

    Participant

    ?

    ` #bp_activity_bar ul, li {}
    `
    That is known as a grouped selector set did you intend that? you are applying that ruleset to #bp_activity_bar ul AND generic li elements

    p.s try and keep to lowercase syntax

    @efrik07

    Member

    Good! try and keep to lowercase syntax
    Link removed – not sure the purpose of this link or the comment could you explain please @mention me on my profile – hnla

    @xberserker

    Participant

    @hnla Correct, but it’s not working correctly. It’s also styling the primary activity stream on buddypress.

    @hnla

    Participant

    when you say correct what exactly do you mean? you intended that ruleset to try and applu it’s styles to any li element that it could in a BP installation?

    The main activity stream consists of ul constructs so it has li children and would very possibly pick up the styling form your ruleset.

    @xberserker

    Participant

    I had my friend try it and see how all the text and links are white on the main BuddyPress Activity Stream and should not be? http://footfinger.com/activity/ The bar at the bottom is correct though style wise. I’m not a CSS Guru, I’m sure it’s something simple, but I’m just not seeing it.

    @hnla

    Participant

    Did you not actually intend to write:

    `#bp_activity_bar ul li {}`

    Minus the comma seperated selector which would then only style elements that has a parent ul and #bp_activity_bar

    @xberserker

    Participant

    See I knew it was something simple, lol. Thank you SOO much for your speedy assistance. I’ll just need to tidy up some things and then I’ll submit it to the wordpress plugin directory sometime this week.

    @hnla

    Participant

    cool it’s a common oversight the use of the comma, especially where it’s not realised that one would need to state the full parent selectors each time.

    so what’s the plugin do?

    @xberserker

    Participant

    @hnla Actually on my buddy’s site – http://footfinger.com/activity/ the links are still getting the white from my plugin and it shouldn’t be. Same goes for my test site .. mmmm

    The plugin pulls the last 20 buddypress activities and rotates threw them at the bottom of the screen.

    @hnla

    Participant

    Have you ensured your cache is force refreshed ctrl+f5 FF winblows

    @hnla

    Participant

    it’s fine in my browser

    @xberserker

    Participant

    I have yes, even tried a new fresh browser. Try mousing over one of the links in the activity and it will turn white.

    @hnla

    Participant

    it’s as I mentioned earleir it’s the classic error:

    you say this:
    `#bp_activity_bar ul li a:link,`
    and you want to apply that to all pseudo class links so do this:

    `#bp_activity_bar ul li a:link,a:visited,a:active,a:hover,img {}`

    you have actually styled the activity bar :link class and then closed of that selector set and styled the generic pseudo elements

    When you use grouping selectors ‘,’ you must re-state the full descendent path each time i.e you must state `#_activity_bar ul li :whatever {}`

    @xberserker

    Participant

    Ah so like this:
    `#bp_activity_bar ul li link {color:#ddd;}
    #bp_activity_bar ul li a:visited {color:#ddd;}
    #bp_activity_bar ul li a:active {color:#ddd;}
    #bp_activity_bar ul li a:hover {color:#ddd;}
    #bp_activity_bar ul li img {border:0;}`

    That did it! Whew, that’s a big load off my mind, lol. Thank you for being patient with me hnla.

    @hnla

    Participant

    yes but you can group them.

    the img I would have thought was already dealt with by BP rules

    this might work, as you don’t want to necessarilly style all the pseudo classes if you cab style the anchor alone:
    `
    #bp_activity_bar ul li a {
    color:#ddd;
    border:0;
    }
    `
    might not work though in which case add in the pseudo classes as necessary:
    `
    #bp_activity_bar ul li a:link,
    #bp_activity_bar ul li a:focus {
    color:#ddd;
    border:0;
    }`
    etc

    @xberserker

    Participant

    `#bp_activity_bar ul li a {color:#ddd; border:0;}`

    The above did work, always nice to slim down the CSS :) Thanks!

    @hnla

    Participant

    Good thing is as long as you link to stylesheets rather than embed styles the browser always caches – or should, but keeping styles and rulesets lean is always good from many points such as inheritance, specificity, etc; the more overworked rules become the harder it is to debug to the point where it actually becomes impossible without starting over.

    @xberserker

    Participant

    @hnla Plugin is now live! But on the BuddyPress site how can I get rid of the warning message?

    “Warning: This plugin has not been tested with the latest version of BuddyPress”

    https://buddypress.org/community/groups/buddypress-activity-stream-bar/
    https://wordpress.org/extend/plugins/buddypress-activity-stream-bar/

    @bowromir

    Participant

    @xberserker: There are some problems with your plugin (which is awesome btw!).

    You made a mistake when naming the folder or when calling the css/js files. When you install the plugin it tried to load the CSS and JS in the following path:

    /wp-content/plugins/buddypress-activity-bar

    While the actual path is

    /wp-content/plugins/buddypress-activity-stream-bar

    Changing the folder name causes a php error :-)

    @hnla

    Participant

    Not entirely sure what triggers that warning, I simply ensured I had correctly filled in the readme.txt ?

    Tags: buddypress, profiles, map, profile map, location
    Requires at least: WP 2.9, BuddyPress 1.2.4
    Tested up to: WP 3.0.1, BuddyPress 1.2.6
    Stable tag: 1.1

    which you appear to have as well, wonder if it has to do with the loader.php or at least having a file with that name or similar I used upm-loader.php to initialize and call the main file slightly unnecessarily as I remember thinking as could quite easily have worked from the main file and run the BP init check

    @xberserker

    Participant

    @bowromir Thanks, totally spaced that for some reason. I need to finish up some work then I’ll correct that error. Sorry about that.

    @hnla Guess I’ll add a loader file ..

    @hnla

    Participant

    I would be surprised if that was the reason though but noticed a few plugins showing this warning and on some of the better known and reliabal ones so it’s odd @DJPaul probably knows why or perhaps @boonebgorges does

    @xberserker

    Participant

    Ok, just uploaded a new version with the js/css fix. I’ll have to look at the loader stuff another day… thanks for the help guys.

    @bowromir ok, new version is up. Let me know if that fixes the issue.

    @djpaul

    Keymaster

    I think the wp.org plugins site has been having issues about updating itself the last few weeks. I’d not worry about it for now, I know people are looking at it.

Viewing 24 replies - 1 through 24 (of 24 total)
  • The topic ‘New Help With Styling CSS to Complete New Plugin | BuddyPress Activity Stream Bar’ is closed to new replies.
Skip to toolbar