diff --git a/src/main.ts b/src/main.ts index 62b8e20..bd71a4b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,3 +16,11 @@ const sh_log = new ShLogger(); export { theme, ShLogger, css, Logger, LEVELS }; export default sh_log; + +const r = css` +background-color: #292F4C; +color: white; +padding: 2px 5px; +`; + +r; diff --git a/src/style/index.ts b/src/style/index.ts index 4108071..6b197a1 100644 --- a/src/style/index.ts +++ b/src/style/index.ts @@ -9,7 +9,7 @@ import { Shape, Slider } from "./shape"; type Text = string | number; const line = (str?: string) => { - return str ? str.replace(/\s*(;|\{|\})+\s*[\n\r]*/g, "$1") : ""; + return str ? String(str).trim().replace(/\s*(;|\{|\})+\s*[\n]*[\n\r]*/g, "$1") : ""; }; export const css = (literals: TemplateStringsArray, ...values: Text[]) => {