Skip to content

Commit 63332b8

Browse files
authored
remove bootstrap css from customizer (#408)
1 parent f5c0c7f commit 63332b8

File tree

6 files changed

+35
-4
lines changed

6 files changed

+35
-4
lines changed

src/assets/js/customizer/search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ BOLDGRID.CUSTOMIZER.Search = BOLDGRID.CUSTOMIZER.Search || {};
6767
if ( 'sidebar' === section.type ) {
6868
sidebar = wp.customize.section( section.id );
6969
panel = wp.customize.panel( sidebar.params.panel );
70-
_.each( sidebar.sidebarMeta.controls, function( v ) {
70+
_.each( sidebar.controls(), function( v ) {
7171
var c;
7272
c = v.params;
7373
c.label = c.label.replace( /:/g, '' );

src/assets/scss/customizer/controls.scss

+5
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,11 @@
895895
color: #23282d;
896896
}
897897

898+
/* General Customizer Styles */
899+
h1, h2, h3, h4, h5, h6 {
900+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
901+
}
902+
898903
/*--------------------------------------------------------------
899904
# Customizer Sidebar Controls
900905
--------------------------------------------------------------*/

src/assets/scss/customizer/controls/_dropdown-menus.scss

+7
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ li.customize-control-bgtfw-dropdown-menu {
6363
vertical-align: top;
6464
font-size: 1.6em;
6565
padding: 0.4em;
66+
color: #50575e;
67+
box-sizing: content-box;
6668
}
6769
.text {
70+
color: #50575e;
6871
vertical-align: middle;
6972
padding: 0.4em;
7073
}
@@ -89,6 +92,10 @@ li.customize-control-bgtfw-dropdown-menu {
8992
font-weight: inherit;
9093
padding-bottom: 10px;
9194
border-bottom: solid 1px #dcdcde;
95+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
96+
a {
97+
text-decoration: underline;
98+
}
9299
}
93100
&.bgtfw-dropdown-menu-help-label {
94101
padding-left: 10px;

src/assets/scss/customizer/controls/_presets.scss

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
width: 125px;
55
height: 125px;
66
margin: 10px;
7+
position: relative;
8+
display: inline-block;
79
img {
810
border-radius: 15px;
911
}
@@ -12,6 +14,11 @@
1214
box-shadow: 0 0 5px 5px #2271B1;
1315
border: 1px solid #fff;
1416
}
17+
18+
input {
19+
display: none;
20+
}
21+
1522
}
1623

1724
#customize-control-bgtfw_header_preset_branding,

src/includes/class-boldgrid-framework-styles.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,15 @@ public static function convert_array_to_css( $css_rules, $id ) {
582582
* @since 1.0.0
583583
*/
584584
public function add_editor_styling() {
585-
$local_files = $this->get_local_editor_styles();
585+
global $wp_customize;
586586

587-
apply_filters( 'boldgrid_theme_framework_editor_styles', $local_files );
588-
add_editor_style( $local_files );
587+
$is_editor = false !== strpos( $_SERVER['REQUEST_URI'], '/post-new' ) || false !== strpos( $_SERVER['REQUEST_URI'], 'action=edit' );
588+
589+
if ( $is_editor ) {
590+
$local_files = $this->get_local_editor_styles();
591+
apply_filters( 'boldgrid_theme_framework_editor_styles', $local_files );
592+
add_editor_style( $local_files );
593+
}
589594
}
590595

591596
/**

src/includes/customizer/class-boldgrid-framework-customizer.php

+7
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,13 @@ public function enqueue_styles() {
420420
array(),
421421
$this->configs['version']
422422
);
423+
424+
wp_enqueue_style(
425+
'kirki-control-styles',
426+
$this->configs['framework']['root_uri'] . '/includes/kirki/controls/css/styles.css',
427+
array(),
428+
$this->configs['version']
429+
);
423430
}
424431

425432
/**

0 commit comments

Comments
 (0)