Strong, bold, or span.bold? and then some

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Tekwriterman
Jr. Propeller Head
Posts: 8
Joined: Thu Jun 01, 2006 8:15 am
Location: Halifax, Nova Scotia, Canada
Contact:

Strong, bold, or span.bold? and then some

Post by Tekwriterman »

Flare recommends using styles instead of inline styles...
Does that mean one should not use <strong></strong> and instead use a class under the <span> tag?
Would the same apply to <em>?
What about lists: use classes under <li>, <ul>, <ol> tags, or create classes under <p> tag again?
Last edited by Tekwriterman on Tue Jul 23, 2019 6:29 am, edited 3 times in total.
Day One User :flare: Go Flare!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Strong or p.bold? and then some

Post by ChoccieMuffin »

I'd be interested to see what the consensus is for this one too.

I avoid inline styles, and rather than use <b> for specific instances of a type of text, I have spans that I apply. For example my UI terms are span.UI that just happens to have bold in it, and I apply span.UI, and I have another span that is used for x-refs where I'm not actually using a x-ref but want the text to look like it (span.x-ref), and another that I use for text that the user has to input, which I (yes, you guessed it) call span.input.
However, when it comes to something that I'm making bold for emphasis, like this, I tend to just use <b>, because I couldn't think of any instance where I'd want to make a global change to that kind of usage.

If I've got an entire paragraph that I want to be bold, for example the introductory paragraph that goes before a procedure, rather than just applying bold to the entire paragraph I have p.intro (which also has page-break-after: avoid; set) because the reason I'm changing the formatting from just an ordinary paragraph is functional.

For lists, I tend to have most of the formatting on the ul or ol tag and don't have different li setups. I do have a complex selector li p so that it matches what an ordinary li has, but it all depends how you implement lists.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Strong or p.bold? and then some

Post by Psider »

In theory, strong and em tell you the purpose of the piece of text (similar to H1, article, etc) , not how it's formatted . Whereas b tells you it's bold and i tells you it's italic.

MDN has a couple of good examples:
https://developer.mozilla.org/en-US/doc ... ent/strong

(whether people do this in practice is a different question :) )

EDIT: and another interesting link.
https://codeengineered.com/blog/2013/ht ... ld-strong/
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Strong or p.bold? and then some

Post by ChoccieMuffin »

Psider wrote:In theory, strong and em tell you the purpose of the piece of text (similar to H1, article, etc) , not how it's formatted . Whereas b tells you it's bold and i tells you it's italic.
D'oh! It's obvious when you put it like that! (But I suspect I'll continue using bold and italic.) :wink:
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
yonatanlehman
Propeller Head
Posts: 51
Joined: Mon Sep 18, 2017 6:14 am

Re: Strong, bold, or span.bold? and then some

Post by yonatanlehman »

But there is the rub - how do you add an <em> withour resorting to the text editor?
It's not in the toolbar and not in the style window
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Strong, bold, or span.bold? and then some

Post by Chicago_HPT »

Interesting. It's in the Styles panel for me.

The styles in the list change depending on the location of the editing cursor. For example, the em style only shows up when the cursor (or selection) is at inline content (like text), which the tag can be applied to, as opposed to block content (like p or h1). So if I select words within a paragraph or heading, em shows in the list. But if I select the entire paragraph or heading so the selection is a p tag or h1 tag (and everything within the tag), then em doesn't display in the list.
forumpicFlareStyleList_em.png
You do not have the required permissions to view the files attached to this post.
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Strong, bold, or span.bold? and then some

Post by doloremipsum »

yonatanlehman wrote:But there is the rub - how do you add an <em> withour resorting to the text editor?
It's not in the toolbar and not in the style window
It may appear if you have something defined for it in the stylesheet. Open up the stylesheet in a text editor and add an empty style (em { }) or make a minor change to it. Then it may well appear in your style window.

On the main topic, we use predefined span classes for inline formatting - partially because they were imported with our content from Author-IT, partially they are styled differently between different outputs (and marketing may want to change the whole lot at some point anyway - it's happened before).
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
kmorrison
Sr. Propeller Head
Posts: 104
Joined: Mon Nov 11, 2013 3:04 pm
Location: Ottawa, Canada
Contact:

Re: Strong, bold, or span.bold? and then some

Post by kmorrison »

If you disabled the <em> style, it won't be available in the editor. Any chance that could have happened, yonatanlehman ?
Jeong
Propeller Head
Posts: 25
Joined: Wed Jan 01, 2020 12:05 am

Re: Strong, bold, or span.bold? and then some

Post by Jeong »

I was wondering about this too. I've resorted to using inline <b> tags because I can't seem to find a keyboard shortcut way to wrap a selected piece of text in <span class="bold">. (Doing a lot of importing from old Word docs that has all its content laid out in tables (I know!), so my workflow at the moment is Import (strip all formatting) > copy content in TD > paste into Flare topic > select text and apply a style quickly... mouse-clicks into Style pane takes too long when you have to do it as many times as I do at the mo!).

My thinking was that maybe I want to change the formatting of bold text later... but the lack of a keyboard shortcut way of wrapping text in a defined style has killed that for me.
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Strong, bold, or span.bold? and then some

Post by doloremipsum »

On the topic of keyboard shortcuts, you can record macros and apply them to any shortcut you want. You can record and manage them from the Tools ribbon.

I've used that to create shortcuts for our span classes - but note that the behaviour isn't quite the same as the classic CTRL+B. You have to highlight the text you want and then run the macro to apply the span class.
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
Post Reply