• Hello!

    First, thank you for the great plugin. It’s very useful!

    Is it possible to prevent the plugin from inserting inline styles on the .lyte-wrapper nodes?

    I’m talking about these styles (**):

    <div class="lyte-wrapper" ** style="width:1280px;max-width: 100%;margin:5px auto;" **>
    	<div class="lyMe hidef" id="WYL_2yHK6A1oOB8">
    		<div id="lyte_2yHK6A1oOB8" data-src="https://i.ytimg.com/vi/2yHK6A1oOB8/maxresdefault.jpg" class="pL">
    			<div class="tC">
    				<div class="tT">A Realistic Day in the Life of Me</div>
    			</div>
    			<div class="play"></div>
    			<div class="ctrl">
    				<div class="Lctrl"></div>
    				<div class="Rctrl"></div>
    			</div>
    		</div>
    		<div>
    			<noscript>
    				<a href="http://youtu.be/2yHK6A1oOB8" data-rel="lightbox-video-0"><img src="http://i.ytimg.com/vi/2yHK6A1oOB8/0.jpg" alt="" width="1280" height="700" /><br />Lire cette vidéo sur YouTube</a>
    			</noscript>
    		</div>
    	</div>
    	<div class="lL" ** style="max-width:100%;width:1280px;margin:5px auto;" **></div>
    </div>

    Indeed, I do prefer dealing with styles with CSS only and keep the DOM clean.

    Thanks in advance for your help!

    https://wordpress.org/plugins/wp-youtube-lyte/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Bonjour kReEsTaL;
    This isn’t possible in the current version I’m afraid. But who knows one day someone (you?) issues a pull request on GitHub to fix this? 😉

    Bonnes fêtes!
    frank

    Hello Frank,

    I also had to change the 5px to 0px of the margin around the video, else it would show scrolbars underneith. I know you added it so it looks better in some themes, so you said in another reply in this forum, but looks like some of us, like kReEsTaL and me, see the use of a possibility to add personal CSS to the video.

    No-programmer here so go easy on me ;).

    Thank you, great plugin, keep up the good work!

    -Ronald

    Plugin Author Frank Goossens

    (@futtta)

    Hi there Ronald;
    Seems kind of overkill to add a CSS-override field to the Lyte settings page really, I want less instead of more options. But there’s a lot of manners to add style, using plugins or even simply with a text-widget with inline style in it.

    put something like this in a text widget (just making this up, could be wrong selector) and you should be good to go;

    <style>.lyte-wrapper{margin:0px;}</style>

    hope this helps,
    frank

    Thank you Frank, that could be an option indeed when I use the videos in widgets.

    I actually use the plugin to put video in posts, like videos of products in WooCommerce, and it works great.

    Changing the plugin file is also not a big problem, even if you need to do it every time there is an update ;).

    Thank you again,

    -Ronald

    Plugin Author Frank Goossens

    (@futtta)

    (unless I’m terribly mistaking) you can add style like that even if you’re not using lyte widgets. the style in the widget goes in the HTML and is applied to the node which matches the selector, even if that is not part of the widget. just give it a try, you’ll see it works 🙂

    (I would avoid changing plugin files really, esp. if there are better ways)

    frank

    Thread Starter kreestal

    (@kreestal)

    Thanks a lot for your reply, Frank. I may issue a pull request if I can work this out.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove inline styles ?’ is closed to new replies.