code structure

Code of graftee is in accordance with its own rules, to easy to understand and has become to customize easily. This article describes the structure of HTML and style.css and functions.php.

Please go to these hints development and customization.

HTML structure

HTML of graftee is following structure.

  1. header
    1. h1(page title)
    2. p(blog name)
    3. a(Skip to content)
  2. nav(global navigation)
  3. ol(breadcrumbs)
  4. main
    1. article
    2. ul(previous link, next link)
    3. iframe(comment)
  5. aside(widget)
  6. footer
    1. p
      1. small(blog name)
      2. small(copyright)
    2. a(To the top)

In this way graftee is made of easy-to-understand and simple. And it has been able to semantic using the appropriate elements.

style.css structure

Outermost block of CSS is a media query. media query of graftee is divided into three. It is accessibility, small device, and large device. Structure in one of the media query are listed in order from the top of the HTML source.

Graftee has been made with the aim of best make. Therefore, Graftee has been made on the premise that use the function of the future W3C is planning. Its function is not supported by current browsers. It is expected to use Once the function has been recommended. It is a light-level of media query that will be in CSS4. light-level is a media query to switch the style by setting the contrast of the monitor. light-level is you try on the judgment of the low vision.

media query of style.css of Graftee are described in the following order from the top.

  1. media query outside
  2. Common style of large devices and small device
  3. small device
  4. large devices

Some on “media query outside” is the style of the plan to include in the media query of future light-level. Graftee is the capacity reduction would like to say without writing many times the same style by creating a media query of “common device large and small device.”

functions.php structure

functions.php of Graftee has become a structure that sticks to display speed. Graftee has surrounded the most out of a big if statement. The if statement is divided into the public side dedicated processing and management side dedicated processing. And, the part that is not surrounded by the if statement is a common processing.

The public side of the Graftee is Management side dedicated processing will not be executed. Management side of Graftee is The public side of the dedicated processing will not be executed.

広告