styles.php
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<style>
<?php foreach( $this->styles as $name => $style ): ?>
<?php
$class = 'acp-cf-style-'.$name;
?>
.<?= $class ?>,
.acp-cf-conditions__row .-style button.<?= $class ?>,
table tr td .<?= $class ?> {
<?php if ( ! empty( $style['background'] ) ) : ?> background: <?= esc_html( $style['background'] ) ?>;
<?php endif;?> background-color: <?= $style['background_color'] ?? 'transparent' ?>;
color: <?= esc_html( $style['color'] ?? '' ) ?>;
<?php if ( ! empty( $style['background_color'] ) ) : ?> border-color: <?= esc_html( $style['background_color'] ) ?>;
<?php endif; ?>
}
<?php if ( ! empty( $style['background_color'] ) || ! empty( $style['background'] ) ) : ?>
table tr td .<?= $class ?> {
padding: 2px 4px;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
border-radius: 2px;
}
<?php endif; ?>
table tr td .<?= $class ?> > *,
table tr td .<?= $class ?> span.dashicons {
color: <?= esc_html( $style['color']??'' ) ?>;
}
.<?= $class ?> a,
.<?= $class ?> a:hover,
.<?= $class ?> a:focus {
text-decoration: underline;
}
<?php endforeach;?>
</style>