Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/12/2015 03:23:45 PM (12 years ago)
Author:
hnla
Message:

Updates to twentyfourteen companion styles

  • Update message-box mixin, use default text-color based on background selected if no arg passed for color, remove set color args.
  • Add override clear none to counter themes heading clearing.
  • Update group members list display general & mobile.
  • Update users/groups headers, global styles, correct messages rendering in header area.
  • Update group-member-search for style and mobile rendering.

See #6338

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/css/twentyfourteen.scss

    r9861 r9864  
    103103
    104104// BP message boxes
    105 @mixin message-box($background, $text-color: inherit) {
     105@mixin message-box($background, $text-color: null) {
     106
     107        @if($text-color) {
     108                // if a param was passed through
     109                $text-color: $text-color;
     110        } @else {
     111                $text-color: darken($background, 50%);
     112        }
     113
    106114        background: lighten($background, 10%);
    107115        border: 1px solid darken($background, 10%);
    … …  
    194202*/
    195203
     204// Twentyfourteen  adds a generic grouped ruleset of clear:both;
     205// for all heading h# elements this is problematic where floats are concerned
     206// We reset this here under our #buddypress namespace
     207#buddypress {
     208        h1,
     209        h2,
     210        h3,
     211        h4,
     212        h5,
     213        h6 {
     214                clear: none;
     215        }
     216}
     217
    196218// As BP screens have specific content lets adjust the themes primary elements
    197219// to maximise the screen real estate for BP pages.
    … …  
    502524                        }
    503525
     526                        .item {
     527                                margin-left: 0;
     528                        }
     529
    504530                        // groups group description
    505531                        div.item-desc {
    … …  
    509535
    510536                        div.action {
     537                                clear: both;
     538                                float: none;
     539                                margin: 0;
    511540                                position: relative;
    512541                                text-align: left;
    513                                 top: 0;
    514542
    515543                                div {
    … …  
    540568                                .item {
    541569                                        float: right;
     570                                        margin-left: 5%;
    542571                                        width: 80%;
    543572                                }
    544573
    545                                 .activity-meta,
    546                                 .action {
     574                                .activity-meta {
    547575                                        clear: both;
    548576
    … …  
    558586                                .item {
    559587                                        float: left;
    560                                         margin-left: 5%;
    561588                                        width: 60%;
    562589
    … …  
    567594                                }
    568595
    569                                 .action {
     596                                div.action {
    570597                                        clear: none;
    571598                                        float: right;
     599                                        top: 0;
    572600                                        width: 25%;
    573601
    … …  
    875903*------------------------------------------------------------
    876904*/
     905// override BP margins - users/groups manage their own styles later on
     906#buddypress {
     907        div#item-header {
     908                padding-bottom: $spacing-val-sm;
     909
     910                img.avatar {
     911                        margin: 0 $spacing-val-md $spacing-val-sm 0;
     912                }
     913
     914                // Prevent messages block abutting bottom of floats, with padding-top
     915                #message {
     916                        clear: both;
     917                        margin-bottom: $spacing-val-xs;
     918                        padding-top: $spacing-val-md;
     919
     920                        p {margin-bottom: 0;}
     921                }
     922        }
     923}
    877924
    878925/**
    … …  
    930977                        #item-actions {
    931978                                float: none;
     979                                margin: 0 0 0 $spacing-val-md;
    932980                                width: auto;
    933981
    … …  
    9731021.bp-user #buddypress {
    9741022        #item-header {
    975                 padding-bottom: $spacing-val-sm;
    9761023
    9771024                #item-header-avatar {
    … …  
    10971144/**
    10981145        *------------------------------
     1146        * 6.2.1.2 - Group members list
     1147        *------------------------------
     1148        */
     1149
     1150#buddypress {
     1151        #members-group-list {
     1152                .item-list {
     1153                        h5 {
     1154                                display: inline-block;
     1155                                margin: 0;
     1156                        }
     1157
     1158                        span.activity {
     1159                                padding-left: $spacing-val-sm;
     1160                        }
     1161                }
     1162        }
     1163} // close #buddypress
     1164
     1165#buddypress {
     1166        #item-body {
     1167                #subnav {
     1168                        li.groups-members-search:focus,
     1169                        li.groups-members-search:hover,
     1170                        li.last:focus,
     1171                        li.last:hover {
     1172                                background: none;
     1173                        }
     1174                }
     1175        }
     1176}
     1177
     1178// Need to target groups members via body classes
     1179.groups.group-members {
     1180        #subnav {
     1181
     1182                ul:before,
     1183                ul:after {
     1184                        content: " ";
     1185                        display: table;
     1186                }
     1187
     1188                ul:after {clear: both; }
     1189
     1190                ul {
     1191                        padding: $spacing-val-xs 0;
     1192                }
     1193
     1194
     1195                li {
     1196
     1197                        @media screen and (max-width: 400px) {
     1198                                background: $content-background;
     1199                                padding: $spacing-val-sm 0;
     1200                                width: 100% !important;
     1201                        }
     1202
     1203                        #search-members-form {
     1204                                @include box-model(border-box);
     1205                                float: left;
     1206                                @media screen and (max-width: 400px) {
     1207                                        margin: 0;
     1208                                        width: 100%;
     1209
     1210                                        label {
     1211                                                input[type="text"] {width: 100%;}
     1212                                        }
     1213                                }
     1214                                @media screen and (min-width: 783px) {
     1215                                        margin-left: 3px;
     1216                                }
     1217                        }
     1218
     1219                }
     1220
     1221        } // close #subnav
     1222} // close .groups.group-members
     1223
     1224/**
     1225        *------------------------------
    10991226        * 6.2.1.3 - Groups Send Invites
    11001227        *------------------------------
    … …  
    13491476#buddypress {
    13501477        div.dir-search,
    1351         div.message-search {
     1478        div.message-search,
     1479        li.groups-members-search {
    13521480                clear: both;
    13531481                float: none;
    … …  
    14131541
    14141542                div.message-search { margin: 3px 0 0;}
     1543
     1544                li.groups-members-search {
     1545                        form {
     1546                                label,
     1547                                input[type='submit'],
     1548                                input[type='text'] {
     1549                                        width: auto;
     1550                                }
     1551                        }
     1552                }
     1553
    14151554        } // close @media
     1555
    14161556} // close #buddypress
    14171557
    … …  
    14291569*-------------------------------------------------------------------------------
    14301570*/
    1431 #buddypress {
     1571// message args ($variable-color, text-color)
     1572// Leave text-color undefined to automagically set text color
     1573// to background color darker by 50%
     1574#buddypress {
     1575
    14321576        div#message {
    14331577                p {
    … …  
    14381582                &.info {
    14391583                        p {
    1440                                 @include message-box($notice-info, #fff);
     1584                                @include message-box($notice-info);
    14411585                        }
    14421586                }
    … …  
    14441588                &.updated {
    14451589                        p {
    1446                                 @include message-box($notice-update, #fff);
     1590                                @include message-box($notice-update);
    14471591                        }
    14481592                }
    … …  
    14521596} // close  #buddypress
    14531597
    1454 // Without direct classes on our mesages ( 'warning' )
     1598// Without direct classes on our messages ( 'warning' )
    14551599// we need to use the body classes
    1456 // message args ($variable-color, text-color)
    14571600// todo: If this is class .warning is included in main BP styles remove from here
    14581601.delete-group {
    … …  
    14601603                div#message.info {
    14611604                        p {
    1462                                 @include message-box($notice-warning, #fff);
     1605                                @include message-box($notice-warning);
    14631606                        }
    14641607                }
Note: See TracChangeset for help on using the changeset viewer.