QUICK NEWS

{NEW} - A new css video is up.

{OLD} - New video courtesy of Skhilled, Thanks for posting it up.

Video of the moment:


Internal Links

SMF Sites

Quick Info

Code tags

Started by Bigguy, Mar 29, 2019, 02:25 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Bigguy

I'm gettin tired of this. I keep hopin it gets fixed but never does. Here is a section of css code copy and pasted into the editor, highlighted and the code bbc button pressed.

/* Those classes are sharing exact same gradient. *//* Background of buttons */.dropmenu li ul, .top_menu, .dropmenu li li:hover, .button,.dropmenu li li:hover > a, .dropmenu li li a:focus, .dropmenu li li a:hover,#top_section, #search_form .button, .quickbuttons li,.quickbuttons li ul, .quickbuttons li ul li:hover, .quickbuttons ul li a:focus,.popup_window, #inner_section { background: #fff; /* fallback for some browsers */ background-image: linear-gradient(to bottom, #e2e9f3 0%, #fff 70%);}/* Well some of them has different gradient effect on hover */.button:hover, #search_form .button:hover, .quickbuttons li:hover { background: #fff; background-image: linear-gradient(to bottom, #fff 0%, #e2e9f3 70%);}
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Bigguy

I have to manually go in and take out the extra code tags in order for it to look right.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

SychO

I'm afraid I do not understand what you mean.

Bigguy

Well, this is what I see.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Bigguy

That's one piece of code....
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

SychO

yea I see that as well, but I don't understand how you ended up with that

test:
/* You can find detailed information at https://wiki.simplemachines.org/smf/Curve2_CSS
/* Index */
html {
 background: #3e5a78;
}
body {
 background: #e9eef2;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 color: #4d4d4d;
 display: flex;
 flex-direction: column;
 min-height: 100vh;
}
/* General reset */
* {
 box-sizing: border-box;
 padding: 0;
 margin: 0;
}
ul, ol {
 list-style: none;
}
ul.normallist {
 list-style-type: disc;
 padding: 0 0 0 15px;
}
table {
 empty-cells: show;
}
abbr {
 border-bottom: 0.1em dotted;
}
input, button, select, textarea {
 color: #222;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 background: #fff;
 outline: none;
 border: 1px solid #bbb;
 vertical-align: middle;
 border-radius: 3px;
 box-shadow: 1px 2px 1px rgba(160, 187, 221, 0.2) inset;
 padding: 0.3em 0.4em;
}
input:hover, textarea:hover, button:hover, select:hover {
 outline: none;
 border-color: #82a2bc;
}
textarea:hover {
 background: #fbfbfb;
}
input:focus, textarea:focus, button:focus, select:focus {
 outline: none;
 border-color: #7fb0d8;
 background: #fff;
}
input, button, select {
 padding: 0 0.4em;
 height: 2em;
 line-height: 2em;
}
select {
 padding: 0.22em 0.2em; /* selects don't apply line-height */
}
/* Selects with more than one line */
select[size] {
 height: auto;
}
input[type="file"] {
 padding: 2px;
 height: auto;
}
/* Remove default mozilla dotted borders */
input[type="submit"]::-moz-focus-inner, button::-moz-focus-inner {
 border: 0;
}
/* Prevent inputs and images overflowing */
img, input, select, textarea {
 max-width: 100%;
}

Bigguy

Here is another screenshot.

EDIT: I highlighted a piece of code in an editor, pasted it to the editor here, highlighted it again and pressed the code tag in this editor. When you press the source view this is what it looks like
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

lurkalot

#7
Testing.  Pasted code, highlighted then clicked the code button.
/* You can find detailed information at https://wiki.simplemachines.org/smf/Curve2_CSS
/* Index */
html {
 background: #3e5a78;
}
body {
 background: #e9eef2;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 color: #4d4d4d;
 display: flex;
 flex-direction: column;
 min-height: 100vh;
}


Testing.  This time clicking code button and then pasting code between the code tags.
/* You can find detailed information at https://wiki.simplemachines.org/smf/Curve2_CSS
/* Index */
html {
 background: #3e5a78;
}
body {
 background: #e9eef2;
 font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
 color: #4d4d4d;
 display: flex;
 flex-direction: column;
 min-height: 100vh;
}

Bigguy

I have some errors in the error log about this as well. I knew it was gonna happen so after I got my post ready to post I hit preview. I have 6 errors in the logs about this.
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

SychO


Bigguy

Screenshots...Firefox 66 x64
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

Bigguy

Undefined offsets 60, 91
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

SychO

Well if you click on the code button when you're on source mode this won't happen or if you paste "as plain text" instead of just paste, the WYGIWYS mode tries to also copie the pasted text's style so when you wrap it up in a code block it gets messy which is why you should paste as plain text, so I'm not sure it's a bug.

the errors on the other hand should definitely be fixed.

well it'd be great if you posted an issue on GitHub describing both issues so that something can be done about them in the near future :)

Bigguy

I'll post somethin later tonight or tomorrow then on GH. I think it is a bug really. I use the wysiwyg editor a lot, like all the time. This never used to happen in 2.0.x just in 2.1
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

SychO

that's probably because 2.0's is way too old, meanwhile just past the content as plain text instead of normal past if you're gonna wrap it in a code block