Skip to content

Commit

Permalink
- Replicate WP styles (#4)
Browse files Browse the repository at this point in the history
- Replicate WP styles and Fix namespace
  • Loading branch information
pederan authored Dec 1, 2022
1 parent bc7ac69 commit b8e1850
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Description: Adds a banner to the frontend and an item to the admin bar informing about the server environment
* Author: Dekode
* Author URI: https://dekode.no
* Version: 1.0.0
* Version: 1.0.1
*
* @package ProjectBank
* @package Dekode-Label-Environment
*/

declare( strict_types = 1 );
Expand Down Expand Up @@ -58,11 +58,13 @@ function add_admin_bar_styles() {
function add_banner_styles() {
$css = 'body:after{'
. 'align-items:center;'
. 'background-color:#000;'
. 'color:#fff;'
. 'background-color:#1d2327;'
. 'color:#f0f0f1;'
. 'content:"' . \wp_get_environment_type() . '";'
. 'display:flex;'
. 'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;'
. 'font-size:12px;'
. 'font-weight:400;'
. 'left:0;'
. 'line-height:24px;'
. 'justify-content:center;'
Expand All @@ -72,6 +74,7 @@ function add_banner_styles() {
. 'transform-origin:bottom left;'
. 'width:112px;'
. 'z-index:50;'
. '-webkit-font-smoothing:auto;'
. '}'
. 'body.admin-bar:after{' // Admin bar has 32px height - bump label down.
. 'top:88px;'
Expand Down

0 comments on commit b8e1850

Please sign in to comment.