• 0

Editor just broke

Question

Posted (edited) · Report post

My editor just broke (screenshot attached). I have tried restarting my machine. I logged in and out of Wordpress. I cleared my cache. I tried it in an incognito window. No luck.

 

But I do know what I was doing at the moment it broke.

 

I was making a change to LESS / CSS. I changed the following code

 

tbox1-font p {

font-size:20px;

  font-family:Beirut;

text-align:Justified;

  padding: 0 300px 0 300px; 

  color: #FFFFFF;

}

 

to

 

tbox1-font p, ul, il {

font-size:20px;

  font-family:Beirut;

text-align:Justified;

  padding: 0 300px 0 300px; 

  color: #FFFFFF;

}

 

(NOTE: The paddings may not be exact; I don't remember for sure.)

 

It broke directly after I hit cmd+enter. How do I fix it?

Edited by colbystream

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Posted · Report post

I've verified that changing this code is what caused the problem. I can use 'Inspect Element' to take the code away and fixed the problem. Of course, I don't know why this would break anything or where to go to fix it. Please help.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Okay, final update. I managed to get it fixed by correcting it in 'Inspect Element', copying the code, fixing it, repasting and then refreshing. However, I'm not pushing the "Marked Resolved" button yet just because I do want someone to see that the error happened, and what the circumstances were :)

 

Please feel free to leave a comment about how I did something really dumb, or about how it's great I discovered an error that we can verify. Whatevs. Press "Marked Resolved" when you're ready.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

I am not sure what it is you're trying to do, what do you mean change the code? Are you making this change in one of the core files or are you adding this code to the custom CSS editor in DMS ?

 

Also, from the looks of your code the reason as to why it made the DMS editor look weird is because you have added the ul, li at the end the code. By doing that it means that you're applying that style to all ul, li.

 

If you want to style a ul or li, simply create a custom class and add your styling to it, then give your ul that class.

For example:

 

.omfgwtfbbq {

  font-size:20px;
  font-family:Beirut;
  text-align:Justified;
  padding: 0 300px 0 300px; 
  color: #FFFFFF;
}
 
Then add that class name to your ul HTML like so:
 
<ul class="omfgwtfbbq">
  <li>...</li>
  <li>...</li>
  <li>...</li>
</ul>

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Danny,

 

Right, I was adding the change to the Custom CSS. Essentially, I had a certain format applied to paragraph that I also wanted applied to unordered lists. When I just amended ul, li after p, it messed up the editor. I see what you mean. I didn't realize I could include the class in the code itself. I worked it otut by include the class in the Custom CSS box of my textbox.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Dannys right, lets look at your css selector list:

 

tbox1-font p, ul, il {} lets break that down:

 

tbox1-font p, // this is a HTML element called tbox1-font and then a p tag inside it. Now Im sure you meant to put a . or # infront of that as there is no such element as tbox1-font

ul, // here you are blindly selecting ALL ul on ALL pages.

il // same as above for li.

 

​So what you were probably trying to achieve was something like this?

.tbox1-font p,

.tbox1-font ul,

.tbox1-font il {

    font-size:20px;

    font-family:Beirut;

    text-align: justified;

    padding: 0 300px 0 300px; 

    color: #FFFFFF;

}

 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Simon,

 

Oh, now I understand. I didn't now that just listing ul and li instructed the code to ALL lists and not just those associated with the .tbox1 class. Thank you for teaching me.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for informing us the issue has been resolved.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now