Add message styling and reset colors for dark color schemes

This commit is contained in:
Brian Miyaji
2017-03-20 14:12:30 +11:00
parent 6f0d1c7185
commit 9fb4b6616a
4 changed files with 28 additions and 6 deletions

View File

@@ -64,6 +64,15 @@
width: 100% !important; width: 100% !important;
} }
/* Color Resets */
.sp-template input,
.sp-data-table input,
.sp-template .sp-event-logos,
.sp-template .sp-event-staff {
color: initial !important;
}
/* Links */ /* Links */
.sp-template a, .sp-template a,
@@ -644,6 +653,12 @@
border-bottom-color: #00a69c !important; border-bottom-color: #00a69c !important;
} }
/* Messages */
.sp-template .sp-message {
color: #00a69c !important;
border-color: #00a69c !important;
}
/* Post Content */ /* Post Content */
.single-sp_team .has-post-thumbnail .sp-post-content { .single-sp_team .has-post-thumbnail .sp-post-content {

View File

@@ -218,6 +218,13 @@
cursor: pointer; cursor: pointer;
} }
/* Messages */
.sp-message {
padding: 1em;
border: 1px solid transparent;
text-align: center;
}
/* Event Logos */ /* Event Logos */
.sp-event-logos a { .sp-event-logos a {
text-decoration: none; text-decoration: none;

View File

@@ -236,7 +236,7 @@ class SP_Meta_Box_Event_Results {
$auto_columns = wp_list_pluck( $dynamic_results, 'post_name' ); $auto_columns = wp_list_pluck( $dynamic_results, 'post_name' );
?> ?>
<div class="sp-data-table-container"> <div class="sp-data-table-container">
<table class="widefat sp-data-table"> <table class="widefat sp-data-table sp-results-table">
<thead> <thead>
<tr> <tr>
<th class="column-team"> <th class="column-team">
@@ -265,14 +265,14 @@ class SP_Meta_Box_Event_Results {
foreach ( $data as $team_id => $team_results ): foreach ( $data as $team_id => $team_results ):
if ( ! $team_id || -1 == $team_id ) continue; if ( ! $team_id || -1 == $team_id ) continue;
?> ?>
<tr class="sp-row sp-post<?php if ( $i % 2 == 0 ) echo ' alternate'; ?>"> <tr class="sp-row sp-post<?php if ( $i % 2 == 0 ) echo ' alternate'; ?>" data-team="<?php echo $team_id; ?>">
<td> <td>
<?php echo get_the_title( $team_id ); ?> <?php echo get_the_title( $team_id ); ?>
</td> </td>
<?php foreach( $columns as $column => $label ): <?php foreach( $columns as $column => $label ):
$value = sp_array_value( $team_results, $column, '' ); $value = sp_array_value( $team_results, $column, '' );
?> ?>
<td><input type="text" name="sp_results[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>"<?php if ( in_array( $column, $auto_columns ) ) { ?> placeholder="<?php _e( '(Auto)', 'sportspress' ); ?>"<?php } ?> /></td> <td><input class="sp-team-<?php echo $column; ?>-input" type="text" name="sp_results[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>"<?php if ( in_array( $column, $auto_columns ) ) { ?> placeholder="<?php _e( '(Auto)', 'sportspress' ); ?>"<?php } ?> /></td>
<?php endforeach; ?> <?php endforeach; ?>
<td> <td>
<?php <?php

View File

@@ -144,16 +144,16 @@ class SportsPress_Style {
echo '.sp-data-table .sp-highlight,.sp-data-table .highlighted td,.sp-template-scoreboard td:hover{background:' . $colors['background_highlight'] . ' !important}'; echo '.sp-data-table .sp-highlight,.sp-data-table .highlighted td,.sp-template-scoreboard td:hover{background:' . $colors['background_highlight'] . ' !important}';
// Text // Text
echo '.sp-template *,.sp-data-table *,.sp-table-caption,.sp-data-table tfoot a:hover,.sp-template .sp-view-all-link a:hover,.sp-template-gallery .sp-gallery-group-name,.sp-template-details dd,.sp-template-event-logos .sp-team-name,.sp-template-event-logos .sp-team-result,.sp-template-event-blocks .sp-event-results,.sp-template-scoreboard a,.sp-template-scoreboard a:hover,.sp-tournament-bracket,.sp-tournament-bracket .sp-event .sp-event-title:hover,.sp-tournament-bracket .sp-event .sp-event-title:hover *{color:' . $colors['text'] . ' !important}'; echo '.sp-template *,.sp-data-table *,.sp-table-caption,.sp-data-table tfoot a:hover,.sp-template .sp-view-all-link a:hover,.sp-template-gallery .sp-gallery-group-name,.sp-template-details dd,.sp-template-event-logos .sp-team-result,.sp-template-event-blocks .sp-event-results,.sp-template-scoreboard a,.sp-template-scoreboard a:hover,.sp-tournament-bracket,.sp-tournament-bracket .sp-event .sp-event-title:hover,.sp-tournament-bracket .sp-event .sp-event-title:hover *{color:' . $colors['text'] . ' !important}';
echo '.sp-template .sp-view-all-link a,.sp-countdown span small,.sp-template-event-calendar tfoot a,.sp-template-event-blocks .sp-event-date,.sp-template-details dt,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket th,.sp-tournament-bracket .sp-event .sp-event-title,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket .sp-event .sp-event-title *{color:' . $colors['text_muted'] . ' !important}'; echo '.sp-template .sp-view-all-link a,.sp-countdown span small,.sp-template-event-calendar tfoot a,.sp-template-event-blocks .sp-event-date,.sp-template-details dt,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket th,.sp-tournament-bracket .sp-event .sp-event-title,.sp-template-scoreboard .sp-scoreboard-date,.sp-tournament-bracket .sp-event .sp-event-title *{color:' . $colors['text_muted'] . ' !important}';
// Heading // Heading
echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-item a,.sp-template-gallery .gallery-caption,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket thead th,.sp-tournament-bracket .sp-heading{color:' . $colors['heading'] . ' !important}'; echo '.sp-data-table th,.sp-template-countdown .sp-event-venue,.sp-template-countdown .sp-event-league,.sp-template-gallery .gallery-item a,.sp-template-gallery .gallery-caption,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket thead th,.sp-tournament-bracket .sp-heading{color:' . $colors['heading'] . ' !important}';
// Link // Link
echo '.sp-template a,.sp-data-table a,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover{color:' . $colors['link'] . ' !important}'; echo '.sp-template a,.sp-data-table a,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover,.sp-template .sp-message{color:' . $colors['link'] . ' !important}';
echo '.sp-template-gallery .gallery-caption strong,.sp-tournament-bracket .sp-team-name:hover,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-heading{background:' . $colors['link'] . ' !important}'; echo '.sp-template-gallery .gallery-caption strong,.sp-tournament-bracket .sp-team-name:hover,.sp-template-scoreboard .sp-scoreboard-nav,.sp-tournament-bracket .sp-heading{background:' . $colors['link'] . ' !important}';
echo '.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket .sp-heading,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover{border-color:' . $colors['link'] . ' !important}'; echo '.sp-tournament-bracket .sp-team-name:hover,.sp-tournament-bracket .sp-heading,.sp-tab-menu-item-active a, .sp-tab-menu-item-active a:hover,.sp-template .sp-message{border-color:' . $colors['link'] . ' !important}';
} }
} }