- This topic has 8 replies, 3 voices, and was last updated 3 years, 2 months ago by
Sebastian.
Author | Posts |
---|---|
1101blueli
June 17, 2021 at 7:35 am
|
Heads up! this post was created when Microthemer was at version 6. The current version is 7. Some references to the interface may be out of date. I write those css code all the time. But the comment will disappear when switching selector. Like the one on line 44 Wondering is there a option we leave /*comment*/ on the editor? |
Sebastian
June 17, 2021 at 3:53 pm
|
Hey, The single selector editor has some limitations when it comes to comments. If comments are important, you need to add code via View > Full code editor > CSS. Once version 7 is out, I will start work on CSS snippets, which can be added to the folders (like single selectors currently can). And they will integrate with the responsive tabs in the same way too. Cheers, |
1101blueli
June 21, 2021 at 2:09 pm
|
Alright, I see! Thanks |
1101blueli
June 23, 2021 at 10:28 am
|
Oh, I suddenly found that we can leave a comment within the bracket {} Kind of a solution. |
Sebastian
June 23, 2021 at 1:59 pm
|
I just did a test, and MT stripped out the comments. So this may not be a workaround you can rely on. When entering multiple selectors in the code editor, the comments should always stay for all selectors other than the first selector. Only the first selector syncs with the UI fields, the others don’t, and so the custom comment stays. I’m not sure why your body comment wasn’t stripped out. There must be some other factor at play, but just wanted to gives you a head up that it won’t always work. Cheers, |
metoki
February 2, 2022 at 8:59 pm
|
May I ask if there is any news on this topic? I am looking for a way to break down my stylesheet into smaller chunks, and the Single Selector Editor with its folder structure looked like the perfect solution. However, after some time I realized that not only all spacings are removed from my CSS code but also all comments which is kind of a dealbreaker for me. Cheers, |
Sebastian
February 3, 2022 at 12:03 pm
|
No news yet I’m afraid Martin. But a potential workaround could be to enable Sass via:
You may not need Sass, but when it’s on Microthemer does not sync the text editor with the UI fields, which is why comments get stripped out. It just leaves your code as is. So you can write something like the following without losing comments:
Notice that you can also use // for single line Sass comments, which is more convenient. And you can use Sass too of course. Note however, if this is an existing setup any styles that are supported via the UI will only be editable via input fields once you switch Sass support on (they won’t display in the editor). Does that help at all? Cheers, |
metoki
February 4, 2022 at 10:49 am
|
Hi Sebastian, thank you for your answer. This looks like the perfect workaround for me since I don’t use the UI fields anyway. Cheers, |
Sebastian
February 7, 2022 at 9:16 am
|
Oh great, thanks for confirming 🙂 |