Edgewall Software
Modify

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#13308 closed defect (fixed)

Fix styling warning in stylesheets

Reported by: figaro Owned by: figaro
Priority: normal Milestone: 1.4.3
Component: general Version: 1.4
Severity: minor Keywords: patch css
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Added surrounding quotes to font-family names containing whitespace.

Description (last modified by Jun Omae)

As per https://jigsaw.w3.org/css-validator/:

Family names containing whitespace should be quoted. 
If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space. 

Attachments (7)

code.diff (663 bytes ) - added by figaro 5 years ago.
Code.css patch
code.2.diff (657 bytes ) - added by figaro 5 years ago.
Unified diff of code.css stylesheet
trac.diff (1.7 KB ) - added by figaro 5 years ago.
Unified diff of trac.css stylesheet
code.3.diff (711 bytes ) - added by figaro 5 years ago.
Unified diff of code.css stylesheet
trac.2.diff (1.8 KB ) - added by figaro 5 years ago.
Unified diff of trac.css stylesheet
trac-1.4.1.diff (3.1 KB ) - added by figaro 5 years ago.
Single file patch for styling guideline
trac-1.4.1.2.diff (3.8 KB ) - added by figaro 5 years ago.
Added Segoe UI, supersedes attachment with similar name

Download all attachments as: .zip

Change History (19)

by figaro, 5 years ago

Attachment: code.diff added

Code.css patch

comment:1 by Ryan J Ollos, 5 years ago

It's said to be good practice, but doesn't matter in practice: SO:7638833/121694.

If we are going to make the change, trac.css also needs changes. Also we don't want to add whitespace between comma-separated values because we consistently do otherwise throughout the CSS.

Patches should be prepared per TracDev/SubmittingPatches.

comment:2 by figaro, 5 years ago

Agreed, and renewed diffs have been created and attached. The command diff -u was used to generate these files as per TracDev/SubmittingPatches#Makethepatch, so unclear on how the patch is in deviation of the procedure.

by figaro, 5 years ago

Attachment: code.2.diff added

Unified diff of code.css stylesheet

by figaro, 5 years ago

Attachment: trac.diff added

Unified diff of trac.css stylesheet

in reply to:  2 comment:3 by Ryan J Ollos, 5 years ago

Replying to figaro:

so unclear on how the patch is in deviation of the procedure.

If you diff from root of repository you can create a single-file patch with embedded paths. The single-file patch is easier to apply.

Edited TracDev/SubmittingPatches@25.

comment:4 by figaro, 5 years ago

Severity: normalminor

by figaro, 5 years ago

Attachment: code.3.diff added

Unified diff of code.css stylesheet

by figaro, 5 years ago

Attachment: trac.2.diff added

Unified diff of trac.css stylesheet

comment:5 by Jun Omae, 5 years ago

Component: web frontendgeneral
Description: modified (diff)
Keywords: css added
Milestone: next-stable-1.4.x
Type: taskdefect
Version: 1.4

The issue exists in code.css, diff.css and trac.css files since Trac 1.4+. Also, font-family for sans serif has the same.

$ git grep 'font:\|font-family:' mirror/1.4-stable -- 'trac/**/*.css' | sed -e 's/:  */: /g' | sort -u
mirror/1.4-stable:trac/htdocs/css/admin.css:.trac-name { font-family: monospace; }
mirror/1.4-stable:trac/htdocs/css/browser.css: font-family: monospace;
mirror/1.4-stable:trac/htdocs/css/code.css: font-family: Open Sans Mono,Consolas,Lucida Console,monospace; /* code_monospace */
mirror/1.4-stable:trac/htdocs/css/diff.css: font-family: Open Sans Mono,Consolas,Lucida Console,monospace; /* code_monospace */
mirror/1.4-stable:trac/htdocs/css/jquery-ui/jquery-ui.css:      font-family: Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;
mirror/1.4-stable:trac/htdocs/css/trac.css: font-family: Open Sans Mono,Consolas,Lucida Console,monospace; /* code_monospace */
mirror/1.4-stable:trac/htdocs/css/trac.css: font-family: Roboto,Segoe UI,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; /* trac_sans_serif */
mirror/1.4-stable:trac/htdocs/css/trac.css: font-family: inherit;
mirror/1.4-stable:trac/htdocs/css/trac.css: font-family: sans-serif;

comment:6 by figaro, 5 years ago

Summary: Fix styling warning in code.cssFix styling warning in stylesheets

comment:7 by figaro, 5 years ago

Understood what is meant by single file patch.

by figaro, 5 years ago

Attachment: trac-1.4.1.diff added

Single file patch for styling guideline

by figaro, 5 years ago

Attachment: trac-1.4.1.2.diff added

Added Segoe UI, supersedes attachment with similar name

comment:8 by Ryan J Ollos, 5 years ago

Internal Changes: modified (diff)
Milestone: next-stable-1.4.x1.4.3
Owner: set to Ryan J Ollos
Status: newassigned

in reply to:  5 ; comment:9 by Ryan J Ollos, 5 years ago

Replying to Jun Omae:

Also, font-family for sans serif has the same.

W3C says sans-serif must not be quoted.

in reply to:  9 comment:10 by Jun Omae, 5 years ago

Replying to Ryan J Ollos:

Replying to Jun Omae:

Also, font-family for sans serif has the same.

W3C says sans-serif must not be quoted.

Sorry for the unclear.

That means Segoe UI should be quoted at /* trac_sans_serif */ line in trac/htdocs/css/trac.css.

-font-family: Roboto,Segoe UI,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; /* trac_sans_serif */
+font-family: Roboto,'Segoe UI',Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; /* trac_sans_serif */

The change is included in attachment:trac-1.4.1.2.diff.

comment:11 by Ryan J Ollos, 4 years ago

Resolution: fixed
Status: assignedclosed

Thanks for clarification.

Committed to 1.4-stable in r17451, merged in r17452.

comment:12 by Ryan J Ollos, 4 years ago

Owner: changed from Ryan J Ollos to figaro

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain figaro.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from figaro to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.