Results 1 to 8 of 8

Thread: Responsive font

  1. #1
    Sencha User
    Join Date
    Mar 2016
    Posts
    44
    Answers
    2

    Default Responsive font

    Good day,

    Is the exists any mechanism to use responsive and dynamically change font size, padding, margin for whole application.

    Thanks for any thoughts

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2013
    Location
    Slovakia
    Posts
    80
    Answers
    2

    Default

    +1

  3. #3
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,339
    Answers
    20

    Default

    Is this blog helpful?

    See also these demos and a video.

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2013
    Location
    Slovakia
    Posts
    80
    Answers
    2

    Default

    Quote Originally Posted by LesJ View Post
    Is this blog helpful?

    See also these demos and a video.
    Thanks, yes I am aware of this support for building "responsive" web applications within ExtJS, but I am more interested about the possibility to dynamically (on runtime) change font size (and also other size related styles, like padding, margin) for the whole application. Is there some base font size, which can be changed through javascript? I know there is such variable in SASS...

  5. #5
    Sencha Premium Member
    Join Date
    Dec 2013
    Posts
    34

    Default

    Sadly it looks like there is a bit of a hole with the tool sets when it comes to doing stuff like this.
    We are currently looking at exactly the same thing. We are also using Sencha Themer with our application and Themer will only accept font size directives of px or pt.
    In order to allow users to change font-size you really want to have a base font size set that all child elements derive their size from, not have them specifically set in pixels/pt's as is currently the case. That way you could simply add/remove classes at the root level to adjust the base font size and then the rest of the application should update and adjust. Currently, unless I am mistaken, the tooling from Sencha does not allow you to do things like this. The only way to do something like this is to create different themes which can then be switched between and have different font sizes in each theme. However, this makes maintenance a real headache and it is not a good solution.

    Here are some questions for Sencha:

    What is the best way to achieve this?
    When will Themer support REM, EM and % for font sizing?

  6. #6
    Sencha User
    Join Date
    Mar 2016
    Posts
    44
    Answers
    2

    Default

    Different themes is not bad because we can specify for base sass our styles for hole app and then create special themes where we just increase base font. But it will work if you have one base theme. If not it will create real headache =) Thanks for the answers. I found some interested thoughts )cheers

  7. #7
    Sencha Premium Member
    Join Date
    Dec 2013
    Posts
    34

    Default

    Sure that's up to you.... but the problem with themes is down to the way the tooling works. Although you can specify a base font size, you can also go in and adjust the font size of practically any element/component.
    Because the tools only support px and pt, you cannot change the base font size dynamically and have the rest of the font sizes on the page update themselves (which is what our users want) they want to be able to choose the font size to view the app with. If the tooling supported REM, EM and % then this would be possible, but right now you have to create many different themes to handle this and the page would also need to be reloaded to swap in the theme. CSS offers other ways to do this in modern browsers.

  8. #8
    Sencha User
    Join Date
    Mar 2016
    Posts
    44
    Answers
    2

    Default

    Thanks @TABob. I hope some of Developers pay attention and answer on that question from height of bird fly =)

Similar Threads

  1. Replies: 3
    Last Post: 13 Nov 2014, 3:45 PM
  2. Replies: 1
    Last Post: 26 Jun 2014, 6:18 AM
  3. Replies: 2
    Last Post: 21 Apr 2013, 10:41 PM
  4. large font and small font problem with windows affecting web pages
    By santoshsatav in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 1 Dec 2010, 1:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •