state: { success: "", warning: "", error: "", info: "" },
syntax: { keyword: "", string: "", func: "", comment: "" },
page: { width: "", min_height: "", padding: "", margin: "", bg_color: "", border_color: "", text_color: "", shadow: "" },
+ custom_css: ""
};
function resolve_path(path_array) {
}
apply_and_validate_theme(window.RT.theme_library[theme_name], fallback);
+
+ // --- CSS Fallback for Pseudo-Elements and External Libraries ---
+ let style_el = document.getElementById('rt-theme-custom-css');
+ if (!style_el) {
+ style_el = document.createElement('style');
+ style_el.id = 'rt-theme-custom-css';
+ document.head.appendChild(style_el);
+ }
+ // Write the string if it exists, otherwise clear the block
+ style_el.textContent = dictionary.custom_css || '';
+
return true;
}
<title>RT Style System: Reference Manual</title>
<script src="RT-Style_locator.js"></script>
<script>
- window.RT.theme_preference('golden_wheat');
+ window.RT.theme_preference('inverse_wheat');
window.RT.load('Layout/article_tech_ref');
</script>
</head>
document.querySelectorAll('rt·code').forEach((el) => {
el.style.fontFamily = 'monospace';
-
+
const computed = window.getComputedStyle(el);
- const accent = computed.getPropertyValue('--RT·accent').trim() || 'gold';
+ const accent = window.RT.theme('read', 'brand', 'secondary') || 'gold';
const is_block = U.Dom.is_block_content(el);
- const parentColor = computed.color;
+ const parentColor = window.RT.theme('read', 'content', 'main');
const is_text_light = U.Color.is_light(parentColor);
const alpha = is_block ? 0.08 : 0.15;