Skip to:
Content

BuddyPress.org

Changeset 12050


Ignore:
Timestamp:
05/03/2018 06:01:39 PM (7 years ago)
Author:
boonebgorges
Message:

Nouveau: Fix the 'tabbed style' feature for primary item nav.

Fixes #7801.

Location:
trunk/src/bp-templates/bp-nouveau
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/common-styles/_bp-mixins.scss

    r12036 r12050  
    361361
    362362                a,
    363                 span {
     363                span:not(.count) {
    364364                    background: none;
    365365                    border: none;
  • trunk/src/bp-templates/bp-nouveau/common-styles/_bp_navigation.scss

    r12043 r12050  
    477477.buddypress-wrap {
    478478
    479     .item-body {
    480 
    481         @include medium-up {
    482 
    483             // Profile group labels links
    484             // Button navigation as tabbed effect for wide screen
    485 
    486             @include tabbed-links();
    487 
    488             .bp-navs.tabbed-links {
    489                 background: none;
    490                 margin-top: 2px;
    491 
    492                 // For tabbed nav we remove any default button nav styles.
    493                 ul {
    494 
    495                     li {
    496 
    497                         a {
    498                             border-right: 0;
    499                             font-size: inherit;
    500                         }
    501                     }
    502 
    503                     li.last {
    504                         float: right;
    505                         margin: 0;
    506 
    507                         a {
    508                             margin-top: -0.5em;
    509                         }
    510                     }
    511 
    512                     li,
    513                     li.current {
    514 
    515                         a,
    516                         a:focus,
    517                         a:hover {
    518                             background: none;
    519                             border: 0;
    520                         }
    521 
    522                         a:active {
    523                             outline: none;
    524                         }
    525                     }
    526                 }
    527             } // close .bp-navs.tabbed-links
    528         } // @media
    529     }
    530 }
     479    @include medium-up {
     480
     481        // Profile group labels links
     482        // Button navigation as tabbed effect for wide screen
     483
     484        @include tabbed-links();
     485
     486        .bp-navs.tabbed-links {
     487            background: none;
     488            margin-top: 2px;
     489
     490            &.main-navs {
     491
     492            }
     493
     494            // For tabbed nav we remove any default button nav styles.
     495            ul {
     496
     497                li {
     498
     499                    a {
     500                        border-right: 0;
     501                        font-size: inherit;
     502                    }
     503                }
     504
     505                li.last {
     506                    float: right;
     507                    margin: 0;
     508
     509                    a {
     510                        margin-top: -0.5em;
     511                    }
     512                }
     513
     514                li,
     515                li.current {
     516
     517                    a,
     518                    a:focus,
     519                    a:hover {
     520                        background: none;
     521                        border: 0;
     522                    }
     523
     524                    a:active {
     525                        outline: none;
     526                    }
     527                }
     528            }
     529        } // close .bp-navs.tabbed-links
     530    } // @media
     531}
  • trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css

    r12049 r12050  
    553553
    554554@media screen and (min-width: 46.8em) {
    555     .buddypress-wrap .item-body .tabbed-links ul,
    556     .buddypress-wrap .item-body .tabbed-links ol {
     555    .buddypress-wrap .tabbed-links ul,
     556    .buddypress-wrap .tabbed-links ol {
    557557        border-bottom: 1px solid #ccc;
    558558        float: none;
    559559        margin: 20px 0 10px;
    560560    }
    561     .buddypress-wrap .item-body .tabbed-links ul:before, .buddypress-wrap .item-body .tabbed-links ul:after,
    562     .buddypress-wrap .item-body .tabbed-links ol:before,
    563     .buddypress-wrap .item-body .tabbed-links ol:after {
     561    .buddypress-wrap .tabbed-links ul:before, .buddypress-wrap .tabbed-links ul:after,
     562    .buddypress-wrap .tabbed-links ol:before,
     563    .buddypress-wrap .tabbed-links ol:after {
    564564        content: " ";
    565565        display: block;
    566566    }
    567     .buddypress-wrap .item-body .tabbed-links ul:after,
    568     .buddypress-wrap .item-body .tabbed-links ol:after {
     567    .buddypress-wrap .tabbed-links ul:after,
     568    .buddypress-wrap .tabbed-links ol:after {
    569569        clear: both;
    570570    }
    571     .buddypress-wrap .item-body .tabbed-links ul li,
    572     .buddypress-wrap .item-body .tabbed-links ol li {
     571    .buddypress-wrap .tabbed-links ul li,
     572    .buddypress-wrap .tabbed-links ol li {
    573573        float: right;
    574574        list-style: none;
    575575        margin: 0 0 0 10px;
    576576    }
    577     .buddypress-wrap .item-body .tabbed-links ul li a,
    578     .buddypress-wrap .item-body .tabbed-links ul li span,
    579     .buddypress-wrap .item-body .tabbed-links ol li a,
    580     .buddypress-wrap .item-body .tabbed-links ol li span {
     577    .buddypress-wrap .tabbed-links ul li a,
     578    .buddypress-wrap .tabbed-links ul li span:not(.count),
     579    .buddypress-wrap .tabbed-links ol li a,
     580    .buddypress-wrap .tabbed-links ol li span:not(.count) {
    581581        background: none;
    582582        border: none;
     
    584584        padding: 4px 10px;
    585585    }
    586     .buddypress-wrap .item-body .tabbed-links ul li a:focus,
    587     .buddypress-wrap .item-body .tabbed-links ul li a:hover,
    588     .buddypress-wrap .item-body .tabbed-links ol li a:focus,
    589     .buddypress-wrap .item-body .tabbed-links ol li a:hover {
     586    .buddypress-wrap .tabbed-links ul li a:focus,
     587    .buddypress-wrap .tabbed-links ul li a:hover,
     588    .buddypress-wrap .tabbed-links ol li a:focus,
     589    .buddypress-wrap .tabbed-links ol li a:hover {
    590590        background: none;
    591591    }
    592     .buddypress-wrap .item-body .tabbed-links ul li.current,
    593     .buddypress-wrap .item-body .tabbed-links ol li.current {
     592    .buddypress-wrap .tabbed-links ul li.current,
     593    .buddypress-wrap .tabbed-links ol li.current {
    594594        border-color: #ccc #ccc #fff;
    595595        border-style: solid;
     
    600600        padding: 0 0.5em 1px;
    601601    }
    602     .buddypress-wrap .item-body .tabbed-links ul li.current a,
    603     .buddypress-wrap .item-body .tabbed-links ol li.current a {
     602    .buddypress-wrap .tabbed-links ul li.current a,
     603    .buddypress-wrap .tabbed-links ol li.current a {
    604604        color: #333;
    605605    }
    606     .buddypress-wrap .item-body .bp-subnavs.tabbed-links > ul {
     606    .buddypress-wrap .bp-subnavs.tabbed-links > ul {
    607607        margin-top: 0;
    608608    }
    609     .buddypress-wrap .item-body .bp-navs.tabbed-links {
     609    .buddypress-wrap .bp-navs.tabbed-links {
    610610        background: none;
    611611        margin-top: 2px;
    612612    }
    613     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a {
     613    .buddypress-wrap .bp-navs.tabbed-links ul li a {
    614614        border-left: 0;
    615615        font-size: inherit;
    616616    }
    617     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.last {
     617    .buddypress-wrap .bp-navs.tabbed-links ul li.last {
    618618        float: left;
    619619        margin: 0;
    620620    }
    621     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.last a {
     621    .buddypress-wrap .bp-navs.tabbed-links ul li.last a {
    622622        margin-top: -0.5em;
    623623    }
    624     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a,
    625     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a:focus,
    626     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a:hover,
    627     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a,
    628     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a:focus,
    629     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a:hover {
     624    .buddypress-wrap .bp-navs.tabbed-links ul li a,
     625    .buddypress-wrap .bp-navs.tabbed-links ul li a:focus,
     626    .buddypress-wrap .bp-navs.tabbed-links ul li a:hover,
     627    .buddypress-wrap .bp-navs.tabbed-links ul li.current a,
     628    .buddypress-wrap .bp-navs.tabbed-links ul li.current a:focus,
     629    .buddypress-wrap .bp-navs.tabbed-links ul li.current a:hover {
    630630        background: none;
    631631        border: 0;
    632632    }
    633     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a:active,
    634     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a:active {
     633    .buddypress-wrap .bp-navs.tabbed-links ul li a:active,
     634    .buddypress-wrap .bp-navs.tabbed-links ul li.current a:active {
    635635        outline: none;
    636636    }
  • trunk/src/bp-templates/bp-nouveau/css/buddypress.css

    r12043 r12050  
    553553
    554554@media screen and (min-width: 46.8em) {
    555     .buddypress-wrap .item-body .tabbed-links ul,
    556     .buddypress-wrap .item-body .tabbed-links ol {
     555    .buddypress-wrap .tabbed-links ul,
     556    .buddypress-wrap .tabbed-links ol {
    557557        border-bottom: 1px solid #ccc;
    558558        float: none;
    559559        margin: 20px 0 10px;
    560560    }
    561     .buddypress-wrap .item-body .tabbed-links ul:before, .buddypress-wrap .item-body .tabbed-links ul:after,
    562     .buddypress-wrap .item-body .tabbed-links ol:before,
    563     .buddypress-wrap .item-body .tabbed-links ol:after {
     561    .buddypress-wrap .tabbed-links ul:before, .buddypress-wrap .tabbed-links ul:after,
     562    .buddypress-wrap .tabbed-links ol:before,
     563    .buddypress-wrap .tabbed-links ol:after {
    564564        content: " ";
    565565        display: block;
    566566    }
    567     .buddypress-wrap .item-body .tabbed-links ul:after,
    568     .buddypress-wrap .item-body .tabbed-links ol:after {
     567    .buddypress-wrap .tabbed-links ul:after,
     568    .buddypress-wrap .tabbed-links ol:after {
    569569        clear: both;
    570570    }
    571     .buddypress-wrap .item-body .tabbed-links ul li,
    572     .buddypress-wrap .item-body .tabbed-links ol li {
     571    .buddypress-wrap .tabbed-links ul li,
     572    .buddypress-wrap .tabbed-links ol li {
    573573        float: left;
    574574        list-style: none;
    575575        margin: 0 10px 0 0;
    576576    }
    577     .buddypress-wrap .item-body .tabbed-links ul li a,
    578     .buddypress-wrap .item-body .tabbed-links ul li span,
    579     .buddypress-wrap .item-body .tabbed-links ol li a,
    580     .buddypress-wrap .item-body .tabbed-links ol li span {
     577    .buddypress-wrap .tabbed-links ul li a,
     578    .buddypress-wrap .tabbed-links ul li span:not(.count),
     579    .buddypress-wrap .tabbed-links ol li a,
     580    .buddypress-wrap .tabbed-links ol li span:not(.count) {
    581581        background: none;
    582582        border: none;
     
    584584        padding: 4px 10px;
    585585    }
    586     .buddypress-wrap .item-body .tabbed-links ul li a:focus,
    587     .buddypress-wrap .item-body .tabbed-links ul li a:hover,
    588     .buddypress-wrap .item-body .tabbed-links ol li a:focus,
    589     .buddypress-wrap .item-body .tabbed-links ol li a:hover {
     586    .buddypress-wrap .tabbed-links ul li a:focus,
     587    .buddypress-wrap .tabbed-links ul li a:hover,
     588    .buddypress-wrap .tabbed-links ol li a:focus,
     589    .buddypress-wrap .tabbed-links ol li a:hover {
    590590        background: none;
    591591    }
    592     .buddypress-wrap .item-body .tabbed-links ul li.current,
    593     .buddypress-wrap .item-body .tabbed-links ol li.current {
     592    .buddypress-wrap .tabbed-links ul li.current,
     593    .buddypress-wrap .tabbed-links ol li.current {
    594594        border-color: #ccc #ccc #fff;
    595595        border-style: solid;
     
    600600        padding: 0 0.5em 1px;
    601601    }
    602     .buddypress-wrap .item-body .tabbed-links ul li.current a,
    603     .buddypress-wrap .item-body .tabbed-links ol li.current a {
     602    .buddypress-wrap .tabbed-links ul li.current a,
     603    .buddypress-wrap .tabbed-links ol li.current a {
    604604        color: #333;
    605605    }
    606     .buddypress-wrap .item-body .bp-subnavs.tabbed-links > ul {
     606    .buddypress-wrap .bp-subnavs.tabbed-links > ul {
    607607        margin-top: 0;
    608608    }
    609     .buddypress-wrap .item-body .bp-navs.tabbed-links {
     609    .buddypress-wrap .bp-navs.tabbed-links {
    610610        background: none;
    611611        margin-top: 2px;
    612612    }
    613     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a {
     613    .buddypress-wrap .bp-navs.tabbed-links ul li a {
    614614        border-right: 0;
    615615        font-size: inherit;
    616616    }
    617     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.last {
     617    .buddypress-wrap .bp-navs.tabbed-links ul li.last {
    618618        float: right;
    619619        margin: 0;
    620620    }
    621     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.last a {
     621    .buddypress-wrap .bp-navs.tabbed-links ul li.last a {
    622622        margin-top: -0.5em;
    623623    }
    624     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a,
    625     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a:focus,
    626     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a:hover,
    627     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a,
    628     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a:focus,
    629     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a:hover {
     624    .buddypress-wrap .bp-navs.tabbed-links ul li a,
     625    .buddypress-wrap .bp-navs.tabbed-links ul li a:focus,
     626    .buddypress-wrap .bp-navs.tabbed-links ul li a:hover,
     627    .buddypress-wrap .bp-navs.tabbed-links ul li.current a,
     628    .buddypress-wrap .bp-navs.tabbed-links ul li.current a:focus,
     629    .buddypress-wrap .bp-navs.tabbed-links ul li.current a:hover {
    630630        background: none;
    631631        border: 0;
    632632    }
    633     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li a:active,
    634     .buddypress-wrap .item-body .bp-navs.tabbed-links ul li.current a:active {
     633    .buddypress-wrap .bp-navs.tabbed-links ul li a:active,
     634    .buddypress-wrap .bp-navs.tabbed-links ul li.current a:active {
    635635        outline: none;
    636636    }
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r12044 r12050  
    15151515        // this is a temp workaround but differs from earlier dir approach- bad!
    15161516        if ( bp_is_group() ) {
    1517             $nav_tabs = bp_nouveau_get_temporary_setting( 'group_nav_tabs', bp_nouveau_get_appearance_settings( 'group_nav_tabs' ) );
     1517            $nav_tabs = (int) bp_nouveau_get_temporary_setting( 'group_nav_tabs', bp_nouveau_get_appearance_settings( 'group_nav_tabs' ) );
    15181518
    15191519        } elseif ( bp_is_user() ) {
    1520             $nav_tabs = bp_nouveau_get_temporary_setting( 'user_nav_tabs', bp_nouveau_get_appearance_settings( 'user_nav_tabs' ) );
     1520            $nav_tabs = (int) bp_nouveau_get_temporary_setting( 'user_nav_tabs', bp_nouveau_get_appearance_settings( 'user_nav_tabs' ) );
    15211521        }
    15221522
    15231523        if ( bp_is_group() && 1 === $nav_tabs) {
    15241524            $classes[] = 'group-nav-tabs';
     1525            $classes[] = 'tabbed-links';
    15251526        } elseif ( bp_is_user() && 1 === $nav_tabs ) {
    15261527            $classes[] = 'user-nav-tabs';
     1528            $classes[] = 'tabbed-links';
    15271529        }
    15281530
     
    15991601
    16001602        $customizer_option = ( bp_is_user() )? 'user_subnav_tabs' : 'group_subnav_tabs';
    1601         $nav_tabs = bp_nouveau_get_temporary_setting( $customizer_option, bp_nouveau_get_appearance_settings( $customizer_option ) );
     1603        $nav_tabs = (int) bp_nouveau_get_temporary_setting( $customizer_option, bp_nouveau_get_appearance_settings( $customizer_option ) );
    16021604
    16031605        if ( bp_is_user() && 1 === $nav_tabs ) {
     
    16441646    function bp_nouveau_get_group_create_steps_classes() {
    16451647        $classes  = array( 'bp-navs', 'group-create-links', 'no-ajax' );
    1646         $nav_tabs = bp_nouveau_get_temporary_setting( 'groups_create_tabs', bp_nouveau_get_appearance_settings( 'groups_create_tabs' ) );
     1648        $nav_tabs = (int) bp_nouveau_get_temporary_setting( 'groups_create_tabs', bp_nouveau_get_appearance_settings( 'groups_create_tabs' ) );
    16471649
    16481650        if ( 1 === $nav_tabs ) {
Note: See TracChangeset for help on using the changeset viewer.