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

This forum is for all Flare issues related to styles, stylesheets and XML.

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

Postby Tekwriterman on Mon Jul 22, 2019 6:07 am

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!
Tekwriterman
Jr. Propeller Head
 
Posts: 8
Joined: Thu Jun 01, 2006 8:15 am
Location: Halifax, Nova Scotia, Canada

Re: Strong or p.bold? and then some

Postby ChoccieMuffin on Mon Jul 22, 2019 7:44 am

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 2019r1 and 2020.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2376
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Strong or p.bold? and then some

Postby Psider on Mon Jul 22, 2019 5:42 pm

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/
Psider
Propellus Maximus
 
Posts: 642
Joined: Wed Jul 06, 2011 1:32 am

Re: Strong or p.bold? and then some

Postby ChoccieMuffin on Tue Jul 23, 2019 6:56 am

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 2019r1 and 2020.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2376
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

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

Postby yonatanlehman on Tue Sep 24, 2019 7:17 am

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
yonatanlehman
Propeller Head
 
Posts: 46
Joined: Mon Sep 18, 2017 6:14 am

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

Postby Chicago_HPT on Tue Sep 24, 2019 9:08 am

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.
Chicago_HPT
Propeller Head
 
Posts: 92
Joined: Sun Feb 03, 2013 6:01 pm

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

Postby doloremipsum on Thu Sep 26, 2019 6:13 pm

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).
neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit - sed saepe cum dolor apud multos callidos mutuetur, reduci potest.
doloremipsum
Sr. Propeller Head
 
Posts: 130
Joined: Mon Aug 26, 2019 2:11 pm

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

Postby kmorrison on Fri Oct 18, 2019 1:17 pm

If you disabled the <em> style, it won't be available in the editor. Any chance that could have happened, yonatanlehman ?
kmorrison
Propeller Head
 
Posts: 93
Joined: Mon Nov 11, 2013 3:04 pm
Location: Ottawa, Canada

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

Postby Jeong on Sat Jan 25, 2020 5:32 pm

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.
Jeong
Propeller Head
 
Posts: 22
Joined: Wed Jan 01, 2020 12:05 am

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

Postby doloremipsum on Tue Jan 28, 2020 3:43 pm

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.
neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit - sed saepe cum dolor apud multos callidos mutuetur, reduci potest.
doloremipsum
Sr. Propeller Head
 
Posts: 130
Joined: Mon Aug 26, 2019 2:11 pm


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 6 guests