? Success

User tests: Successful: Unsuccessful:

avatar ggppdk
ggppdk
2 Dec 2016

Pull Request for Issues #13056 , #11053

Summary of Changes

Make the site title 's font-size,
responsive to the viewport while maintaining
-- a minimum of 22px+ and a maximum of 40px
-- lowest: 22px, at 480px: 26px, at 800px: 33px, at 1024px: 40px

Browsers supported: almost all browsers (includes IE9+)
NOTE: for non-supporting browsers (e.g. IE8) the old CSS values will be used as fallback
(that is why you have font-size defined twice)

[EDIT]
Also the LESS compiling works, (reported below as broken, i fixed it)

Testing Instructions

Apply patch and visit the site frontend,
-- then resize your browser window to see that site title scale up / down, but also notice that it maintains a minimum of 22px and a maximum of 40px

A note: i think, it will be good to start making use of calc() in more places
(while of course using a fallback for non-supporting browsers)

Documentation Changes Required

none

avatar ggppdk ggppdk - open - 2 Dec 2016
avatar ggppdk ggppdk - change - 2 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Dec 2016
Category Front End Templates (site)
avatar ggppdk ggppdk - change - 2 Dec 2016
Labels Added: ?
avatar ggppdk ggppdk - change - 2 Dec 2016
The description was changed
Labels Removed: ?
avatar ggppdk ggppdk - edited - 2 Dec 2016
avatar ralain
ralain - comment - 3 Dec 2016

I personally prefer to do this only on fluid width (adaptive) elements, so I would keep this limited to Protostar's fluid layout.

In any case, you ned to escape the calc expressions, otherwise they will be evaluated by the LESS compiler.

font-size: calc(16px + 1vw); compiles to font-size: calc(17px);

font-size: calc(~"16px + 1vw"); is one way to escape it so it compiles properly.

avatar Bakual
Bakual - comment - 3 Dec 2016

You need to always run php build/generatecss.php when you change something in the {LESS} files. Don't change the CSS files manually.

avatar ggppdk
ggppdk - comment - 3 Dec 2016

You need to always run php build/generatecss.php when you change something in the {LESS} files. Don't change the CSS files manually.

Yes right, i was saving time, remebering that in the past i had used calc somehow and it had passed less compilation (and it does but it needs this escaping),

I will add the escaping and also run build/generatecss.php thus being sure of the real result of the less compiling

avatar ggppdk
ggppdk - comment - 3 Dec 2016

I personally prefer to do this only on fluid width (adaptive) elements, so I would keep this limited to Protostar's fluid layout.

No, both of them have the same issue in small screens !
so fixing is needed in both of them !
(also current CSS does not disguish them in regards to font-size of site title)

But your comment made me think that it is good
-- to also add an upper limit too, to both of them, will do exactly this

avatar ggppdk ggppdk - change - 3 Dec 2016
The description was changed
Labels Removed: ?
avatar ggppdk ggppdk - edited - 3 Dec 2016
avatar ggppdk ggppdk - change - 3 Dec 2016
The description was changed
avatar ggppdk ggppdk - edited - 3 Dec 2016
avatar ggppdk ggppdk - change - 3 Dec 2016
Labels Added: ?
avatar ggppdk
ggppdk - comment - 3 Dec 2016

This is good to test,

I used a better scaling factor and also set maximum to be reached at about 1024px,
(so that it matches existing CSS better)

Font-size will now have
-- minimum of 22px+ and a maximum of 40px

Values (about)
lowest value: 22px,
at 480px: 26px,
at 800px: 33px,
maximum at 1024px: 40px

About calc on line-height i removed it , since not really needed and causes some height jumpling that is a little annoying

avatar ggppdk ggppdk - change - 3 Dec 2016
The description was changed
Labels Removed: ?
avatar ggppdk ggppdk - edited - 3 Dec 2016
avatar ggppdk ggppdk - change - 3 Dec 2016
The description was changed
avatar ggppdk ggppdk - edited - 3 Dec 2016
avatar ggppdk ggppdk - change - 3 Dec 2016
The description was changed
avatar ggppdk ggppdk - edited - 3 Dec 2016
avatar ggppdk ggppdk - change - 3 Dec 2016
The description was changed
avatar ggppdk ggppdk - edited - 3 Dec 2016
avatar ggppdk
ggppdk - comment - 4 Dec 2016

does calc and vw works in all joomla supported browsers?

Thanks, for looking my PR,
No it does not work in all supported browsers,

-- but it does not need to work
-- it only needs to fallback to the some value (in our case it falls back to 40px)

See my comment on the first post of this PR:

Browsers supported: all browsers and IE9+
NOTE: for non-supporting browsers (e.g. IE8) the old CSS values will be used as fallback
(that is why you have font-size defined twice)

avatar Sieger66
Sieger66 - comment - 7 Dec 2016

I have tested this item successfully on 774094d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13064.

avatar Sieger66 Sieger66 - test_item - 7 Dec 2016 - Tested successfully
avatar ggppdk ggppdk - change - 8 Dec 2016
The description was changed
avatar ggppdk ggppdk - edited - 8 Dec 2016
avatar ggppdk ggppdk - change - 8 Dec 2016
The description was changed
avatar ggppdk ggppdk - edited - 8 Dec 2016
avatar coolcat-creations
coolcat-creations - comment - 11 Dec 2016

I have tested this item successfully on 774094d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13064.

avatar coolcat-creations coolcat-creations - test_item - 11 Dec 2016 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 12 Dec 2016
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 12 Dec 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13064.

avatar jeckodevelopment jeckodevelopment - change - 12 Dec 2016
Milestone Added:
avatar rdeutz rdeutz - reference | dd90a09 - 13 Dec 16
avatar rdeutz rdeutz - merge - 13 Dec 2016
avatar rdeutz rdeutz - close - 13 Dec 2016
avatar rdeutz rdeutz - change - 13 Dec 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-12-13 12:21:22
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 13 Dec 2016
avatar rdeutz rdeutz - merge - 13 Dec 2016
avatar ggppdk ggppdk - head_ref_deleted - 13 Dec 2016
avatar cpfeifer cpfeifer - reference | fb3e6ba - 22 Dec 16

Add a Comment

Login with GitHub to post a comment