fix: textausrichtung-option + hover-fixes (link/badge) + remember-farbe (v1.5.2)
- Darstellung: neue option "Textausrichtung" (mittig/links/rechts). Setzt --cb-align (text-align) und --cb-justify (remember-zeile) inline. - "Diesen Dienst kuenftig immer laden" nutzt jetzt die textfarbe (var(--cb-text), ohne dimming). - Datenschutz-link: schriftgroesse/-gewicht/laufweite/transform/decoration in allen zustaenden festgenagelt -> keine theme-a:hover-aenderung mehr. - Werbe-badge: dito -> wird beim hover nicht mehr riesig (theme-scaling/ font-size gesperrt). + i18n DE/EN (138 strings). version 1.5.2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -80,14 +80,19 @@ class CB_Renderer {
|
||||
|
||||
// Build one inline block: CSS variables first, the user's Custom-CSS LAST
|
||||
// so it always overrides. Emitted as a single wp_add_inline_style call.
|
||||
$align = in_array( $style['text_align'] ?? 'center', [ 'left', 'center', 'right' ], true ) ? $style['text_align'] : 'center';
|
||||
$justify = [ 'left' => 'flex-start', 'center' => 'center', 'right' => 'flex-end' ][ $align ];
|
||||
|
||||
$inline = sprintf(
|
||||
':root{--cb-text:%s;--cb-bg:%s;--cb-btn-bg:%s;--cb-btn-text:%s;--cb-btn-hover-bg:%s;--cb-btn-hover-text:%s;}',
|
||||
':root{--cb-text:%s;--cb-bg:%s;--cb-btn-bg:%s;--cb-btn-text:%s;--cb-btn-hover-bg:%s;--cb-btn-hover-text:%s;--cb-align:%s;--cb-justify:%s;}',
|
||||
esc_attr( $style['text_color'] ),
|
||||
esc_attr( $style['bg_color'] ),
|
||||
esc_attr( $style['button_bg'] ),
|
||||
esc_attr( $style['button_text'] ),
|
||||
esc_attr( $style['button_hover_bg'] ),
|
||||
esc_attr( $style['button_hover_text'] )
|
||||
esc_attr( $style['button_hover_text'] ),
|
||||
esc_attr( $align ),
|
||||
esc_attr( $justify )
|
||||
);
|
||||
|
||||
if ( trim( (string) $style['custom_css'] ) !== '' ) {
|
||||
|
||||
Reference in New Issue
Block a user