锴 angry fishtrap 狗 (
kaigou
) wrote
in
style_system
2009-11-17 09:43 pm (UTC)
no subject
Yes and no. If I follow the logic, then currently it's something like this:
-- layout defines property $X
-- layout sets $X = 'blue' ---> default value
-- theme sets $X = 'green' ---> default value for theme
-- user sets $X = 'red' ---> overrides all of the above
Right? So if instead of setting $X in the theme, I define it in the layout like so:
-- layout defines property $X
-- layout defines property $Y
-- layout sets $X = 'blue' ---> default value
-- layout sets $Y = true
-- layout function sez:
... if $Y is true, $X = 'blue', else $X = $Z
-- theme sets $Y = false
-- theme sets $Z = green
-- user sets $X = 'red' ---> overrides all of the above by setting $Y as true and $X as red, theme value is ignored
... OR I could just say to hell with it and do it long-hand, because this is like spending twenty dollars to save ten cents, isn't it.
(
9 comments
)
Post a comment in response:
From:
Anonymous
This account has disabled anonymous posting.
OpenID
Identity URL:
Log in?
Dreamwidth account
Account name
Password
Log in?
If you don't have an account you can
create one now
.
Subject
HTML doesn't work in the subject.
Formatting type
Casual HTML
Markdown
Raw HTML
Rich Text Editor
Message
[
Home
|
Post Entry
|
Log in
|
Search
|
Browse Options
|
Site Map
]
no subject
-- layout defines property $X
-- layout sets $X = 'blue' ---> default value
-- theme sets $X = 'green' ---> default value for theme
-- user sets $X = 'red' ---> overrides all of the above
Right? So if instead of setting $X in the theme, I define it in the layout like so:
-- layout defines property $X
-- layout defines property $Y
-- layout sets $X = 'blue' ---> default value
-- layout sets $Y = true
-- layout function sez:
... if $Y is true, $X = 'blue', else $X = $Z
-- theme sets $Y = false
-- theme sets $Z = green
-- user sets $X = 'red' ---> overrides all of the above by setting $Y as true and $X as red, theme value is ignored
... OR I could just say to hell with it and do it long-hand, because this is like spending twenty dollars to save ten cents, isn't it.