[Resolved] CSS question

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 6 replies, has 2 voices, and was last updated by  Adriano 4 years, 3 months ago. The support staff assigned to this topic is Adriano.

Viewing 7 posts - 1 through 7 (of 7 total)
Author
Posts
#123182

Can somebody point me in the right direction what this is for in the Toolset Bootstrap theme?

/* Fix for code line breaks */
code {
white-space: pre !important; /* CSS 2.0 */
white-space: pre-wrap !important; /* CSS 2.1 */
white-space: pre-line !important; /* CSS 3.0 */
white-space: -pre-wrap !important; /* Opera 4-6 */
white-space: -o-pre-wrap !important; /* Opera 7 */
white-space: -moz-pre-wrap !important; /* Mozilla */
white-space: -hp-pre-wrap !important; /* HP Printers */
word-wrap: break-word !important; /* IE 5+ */
}

#123442

Adriano
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Sao_Paulo (GMT-02:00)

Dear willem-siebeS,

I will check it with the other developers and then I will let you know about. Thank you for your understanding.

#124131

Adriano
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Sao_Paulo (GMT-02:00)

Dear willem-siebeS,

This rules were needed to fix the breaks in the code lines. Without them the break was not working fine in all browsers.

Is there something else I can help you?

#124306

Hi, oke clear. I also digg a little bit deeper to understand it even more, see this article hidden link.
The only thing is, how does a browser know to which one of these it should listen?

white-space: pre !important; /* CSS 2.0 */
white-space: pre-wrap !important; /* CSS 2.1 */
white-space: pre-line !important; /* CSS 3.0 */

All (pre, pre-wrap and pre-line) are valid values, but which one, for example, is my browser going to choose?

#125068

Adriano
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Sao_Paulo (GMT-02:00)

Dear willem-siebeS,

The browser will select the rules which is related with its CSS version. If your browsers are updated, it will use the third rule "white-space: pre-line !important; /* CSS 3.0 */". For some reasons some of these rules don't work in some CSS versions.

It was needed to add all of these rules to fix the issue in attached.

#125104

Thanks for the explenation, really appreciate the attached picture!

#125140

Adriano
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Sao_Paulo (GMT-02:00)

You are welcome.

Viewing 7 posts - 1 through 7 (of 7 total)