{"action":"created","issue":{"url":"https://api.github.com/repos/aristath/kirki/issues/908","repository_url":"https://api.github.com/repos/aristath/kirki","labels_url":"https://api.github.com/repos/aristath/kirki/issues/908/labels{/name}","comments_url":"https://api.github.com/repos/aristath/kirki/issues/908/comments","events_url":"https://api.github.com/repos/aristath/kirki/issues/908/events","html_url":"https://github.com/aristath/kirki/issues/908","id":149405663,"number":908,"title":"Question about styles","user":{"login":"Quaked","id":4580328,"avatar_url":"https://avatars.githubusercontent.com/u/4580328?v=3","gravatar_id":"","url":"https://api.github.com/users/Quaked","html_url":"https://github.com/Quaked","followers_url":"https://api.github.com/users/Quaked/followers","following_url":"https://api.github.com/users/Quaked/following{/other_user}","gists_url":"https://api.github.com/users/Quaked/gists{/gist_id}","starred_url":"https://api.github.com/users/Quaked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quaked/subscriptions","organizations_url":"https://api.github.com/users/Quaked/orgs","repos_url":"https://api.github.com/users/Quaked/repos","events_url":"https://api.github.com/users/Quaked/events{/privacy}","received_events_url":"https://api.github.com/users/Quaked/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-19T09:42:15Z","updated_at":"2016-04-19T13:29:36Z","closed_at":null,"body":"I'm on a specific use-case and I can't wrap my head around preventing the use of a lot of ```<div style=\"bunch-of-styles-from-get-theme-mod-here\">```. I'm new to Kirki and I love it thus far. It has tons of potential, but sometimes one has to ask in order to move forward.\r\n\r\nI'm creating elements on the page using repeater fields. These elements gets a class based on a field inside it (could be generated from its title, another field, etc). Unfortunately I can't style this newly added element using output. I guess I could grab all the mods made, make a \"stylesheet.php\" and assign everything in there and enqueue that? Which could be one way of doing it.\r\n\r\nI'm not sure using output is the method of choice here. I don't know any other way except inline styles or maybe a PHP-file generating styles. Point being every repeater field is a section on the page with its own background image or color and other various settings, so the question is how do I apply these styles?\r\n\r\nMaybe there's a way I've yet to discover? I'd love some light on this issue!"},"comment":{"url":"https://api.github.com/repos/aristath/kirki/issues/comments/211923560","html_url":"https://github.com/aristath/kirki/issues/908#issuecomment-211923560","issue_url":"https://api.github.com/repos/aristath/kirki/issues/908","id":211923560,"user":{"login":"Quaked","id":4580328,"avatar_url":"https://avatars.githubusercontent.com/u/4580328?v=3","gravatar_id":"","url":"https://api.github.com/users/Quaked","html_url":"https://github.com/Quaked","followers_url":"https://api.github.com/users/Quaked/followers","following_url":"https://api.github.com/users/Quaked/following{/other_user}","gists_url":"https://api.github.com/users/Quaked/gists{/gist_id}","starred_url":"https://api.github.com/users/Quaked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quaked/subscriptions","organizations_url":"https://api.github.com/users/Quaked/orgs","repos_url":"https://api.github.com/users/Quaked/repos","events_url":"https://api.github.com/users/Quaked/events{/privacy}","received_events_url":"https://api.github.com/users/Quaked/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T13:29:36Z","updated_at":"2016-04-19T13:29:36Z","body":"Update: so I've been fiddeling around but I can't find a solution that I'm comfortable with. Adding inline styles with ```wp_add_inline_style()``` is a bit of a mess as it takes a \"string\", so formatting a string (or strings) with get_theme_mod stuff from array to string and so on is quite the *thing*. \r\n\r\nAlthough trying to use a PHP-file to hold dynamic styles is no easy task either - not if you want to enqueue it and still access functions such as get_theme_mod(). I was even thinking of using admin-ajax.php and an action to \"include\" the file that way instead, but yeah I'm still a bit lost here."}}