<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[css formatting not working on embed style sheet at the begging of the style section in specific cases]]></title><description><![CDATA[<p dir="auto">Hi all<br />
I am getting a strange behavior on N++ while formatting some code.</p>
<h2>Situation:</h2>
<p dir="auto">I created a html file and in it I added a &lt;style&gt; tag and some embed code to style the page.<br />
It is an all in one file that contains:</p>
<ul>
<li>HTML</li>
<li>Javascript</li>
<li>CSS<br />
code<br />
When I need to edit the CSS code I activate CSS language from the menu Language &gt; C &gt; CSS, as shown into the following screenshot:</li>
</ul>
<ul>
<li>Img 1:<br />
<img src="/assets/uploads/files/1717333978654-a7265402-6ed6-4df9-9ea5-991a7b03270f-notepad-_5vhmvyjgsd.png" alt="a7265402-6ed6-4df9-9ea5-991a7b03270f-notepad++_5vhmvyJGsD.png" class=" img-fluid img-markdown" /></li>
</ul>
<p dir="auto">and of course I do the same for Javascript and HTML codes.<br />
The problem manifests itself when in CSS mode as shown in the following screenshot:</p>
<ul>
<li>Img 2:<br />
<img src="/assets/uploads/files/1717334872116-bc4e3b7b-1b94-488f-8f49-adbaa9d06bb7-notepad-_akbhds6bog.png" alt="bc4e3b7b-1b94-488f-8f49-adbaa9d06bb7-notepad++_AkbhDs6Bog.png" class=" img-fluid img-markdown" /></li>
</ul>
<p dir="auto">The big red curly bracket highlights the problem: as can be seen some code lines are not well formatted.</p>
<p dir="auto">Just moving the same lines after another css block / rule they get formatted correctly as shown below:</p>
<ul>
<li>Img 3:<br />
<img src="/assets/uploads/files/1717335134983-c1236a0f-4423-48d4-a1bf-ee8018091e07-image.png" alt="c1236a0f-4423-48d4-a1bf-ee8018091e07-image.png" class=" img-fluid img-markdown" /></li>
</ul>
<p dir="auto">So it seems that the problem affects only some css selectors, as the asterisk and body in my case (probably others? but I don’t know), when positioned at the start of the &lt;style&gt; section.</p>
<p dir="auto">In both cases they work as expected in the browser so the code seems correct as I understand it.</p>
<p dir="auto">Also creating a separated file for the css code alone, it is formatted correctly as shown in this last screenshot:</p>
<ul>
<li>Img 4:<br />
<img src="/assets/uploads/files/1717335419494-4291ce40-8b79-4fed-892b-6fdff5da811c-image.png" alt="4291ce40-8b79-4fed-892b-6fdff5da811c-image.png" class=" img-fluid img-markdown" /></li>
</ul>
<h2>Questions:</h2>
<ul>
<li>What is the cause of the formatting issue shown by Img 2?</li>
<li>Someone else can replicate the issue?</li>
<li>How can I solve it?</li>
</ul>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25839/css-formatting-not-working-on-embed-style-sheet-at-the-begging-of-the-style-section-in-specific-cases</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 12:08:27 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25839.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 Jun 2024 13:46:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to css formatting not working on embed style sheet at the begging of the style section in specific cases on Mon, 03 Jun 2024 22:36:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/10759">@wonkawilly</a> said in <a href="/post/95116">css formatting not working on embed style sheet at the begging of the style section in specific cases</a>:</p>
<blockquote>
<p dir="auto">Someone else can replicate the issue?</p>
</blockquote>
<p dir="auto">Please post an example for people to experiment with using the <code>&lt;/&gt;</code> code thing that’s available in the forums.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/95168</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/95168</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Mon, 03 Jun 2024 22:36:48 GMT</pubDate></item></channel></rss>