{"action":"created","issue":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1913","labels_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1913/labels{/name}","comments_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1913/comments","events_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1913/events","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/1913","id":102543781,"number":1913,"title":"Propose \"tc-style\" and possibly viewtemplate style setter","user":{"login":"twMat","id":4534056,"avatar_url":"https://avatars.githubusercontent.com/u/4534056?v=3","gravatar_id":"","url":"https://api.github.com/users/twMat","html_url":"https://github.com/twMat","followers_url":"https://api.github.com/users/twMat/followers","following_url":"https://api.github.com/users/twMat/following{/other_user}","gists_url":"https://api.github.com/users/twMat/gists{/gist_id}","starred_url":"https://api.github.com/users/twMat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twMat/subscriptions","organizations_url":"https://api.github.com/users/twMat/orgs","repos_url":"https://api.github.com/users/twMat/repos","events_url":"https://api.github.com/users/twMat/events{/privacy}","received_events_url":"https://api.github.com/users/twMat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-22T15:08:44Z","updated_at":"2015-08-22T23:19:08Z","closed_at":null,"body":"It is very cool that you can now [Apply custom styles by tag](http://tiddlywiki.com/#How%20to%20apply%20custom%20styles%20by%20tag), i.e so that indviidual tiddlers can be styled by defining a CSS class with the name `tc-tagged-<TagName>`.\r\n\r\nHowever, it demands that the user fiddles with css and stylesheets. \r\n\r\nHere follows an idea for an implementation that would make it super easy to style individual tiddlers. \r\n\r\nFirst a prototype, based on the current tc-tagged feature so to illustrate the idea and why it would be much better if we instead could use \"tc-fields\" (perhaps titled tc-style). I.e this works:\r\n\r\n```\r\n<$set name=\"this\" value=<<currentTiddler>>>\r\n<$list filter=\"[all[current]tags[]]\" variable=\"item\">\r\n<$list filter=\"[<item>] +[splitbefore[:]]\" variable=\"attribute\">\r\n<$list filter=\"[<item>] +[removeprefix<attribute>]\" variable=\"value\">\r\n<style>\r\n.tc-tagged-stylethis { <<attribute>><<value>>; }\r\n</style>\r\n</$list>\r\n</$list>\r\n</$list>\r\n</$set>\r\n```\r\n\r\nThe user must tag the tiddler on the form `attribute:value`, e.g `background-color:yellow` - and he needs to tag it \"stylethis\". Not very elegant - but this can be much improved by introducing `tc-style` instead of `tc-tags`. The user *could* then manually define `tc-style-<Field Name>` but...\r\n\r\n... a superior is a modified version of the above so a user can create *fields* like `background-color:yellow`... and the filed drop down list can be predefined to show the standard CSS styling attributes. A user shouldn't have to keep these things in mind or search.\r\n\r\nThis would make styling individual tiddlers super easy."},"comment":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/comments/133763918","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/1913#issuecomment-133763918","issue_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1913","id":133763918,"user":{"login":"pmario","id":374655,"avatar_url":"https://avatars.githubusercontent.com/u/374655?v=3","gravatar_id":"","url":"https://api.github.com/users/pmario","html_url":"https://github.com/pmario","followers_url":"https://api.github.com/users/pmario/followers","following_url":"https://api.github.com/users/pmario/following{/other_user}","gists_url":"https://api.github.com/users/pmario/gists{/gist_id}","starred_url":"https://api.github.com/users/pmario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmario/subscriptions","organizations_url":"https://api.github.com/users/pmario/orgs","repos_url":"https://api.github.com/users/pmario/repos","events_url":"https://api.github.com/users/pmario/events{/privacy}","received_events_url":"https://api.github.com/users/pmario/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T23:19:08Z","updated_at":"2015-08-22T23:19:08Z","body":"interesting approach. .. but where do you insert your prototype template?\r\n\r\ndid you test it? does it work?"}}