Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17562

The base.css file contains a font-size declaration that is overridden in the common.css file.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.0.0-a1
    • Styles

      Hello,

      The base.css file declares a base font size of 16px:

      :root {
      	/* Base font size */
      	--ps-font-base: 16px;								/* [1] */
      	--ps-line-height: 1.5rem;							/* [2] */
       
      	/* Headings */
      	--ps-font-h1: 1.5rem;								/* 24px */
      	--ps-font-h2: 1.5rem;								/* 24px */
      	--ps-font-h3: 1.25rem;								/* 20px */
      	--ps-font-h4: 1.125rem;								/* 18px */
       
      	/* Text and Paragraphs */
      	--ps-font-normal: 1rem;								/* 16px */
      	--ps-font-small: 0.875rem;							/* 14px */
      	--ps-font-tiny: 0.75rem;							/* 12px */
      }
      

      The common.css file, loaded after the previous one, overrides this declaration:

      html {
      	font-size: 100%;
       
      	/* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */
      	height: 101%;
      }
      

      The 100% value on the root element takes the default size of the user agent (usually 16px, unless configured differently). Consequently, the final size applied will be that provided by the agent (100%) and not the value declared in base.css. The rem units will be calculated from this final size.

      Reproduction of the bug:
      declare a different value on --ps-font-base => no change in font size or derived values is applied.

      Suggestion:
      Remove the font-size declaration in common.css

            Unassigned Unassigned
            cabot cabot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: