extends ../_layout/_docs-layout.pug

block variables
  - var slug = 'position'
  - var parent = 'utilities'
  - var title = 'Position utilities - Utilities - Spectre.css CSS Framework'
  - var description = 'Position utilities are used for useful layout and position things, including clearfix, float, position and margin/padding utilities. Spectre.css CSS Framework is a lightweight, responsive and modern CSS framework for faster and extensible development.'

block docs-content
  +docs-heading('position', 'Position utilities')
    include ../_layout/_ad-g.pug

    p
      | Position utilities are used for useful layout and position things, including clearfix, float, position and margin/padding utilities.

    pre.code(data-lang='HTML')
      code
        :highlight(lang="html")
          <!-- clear float -->
          <div class="clearfix"></div>
          <!-- float: left and right -->
          <div class="float-left"></div>
          <div class="float-right"></div>
          <!-- position: relative, absolute, fixed and sticky -->
          <div class="p-relative"></div>
          <div class="p-absolute"></div>
          <div class="p-fixed"></div>
          <div class="p-sticky"></div>
          <!-- centered block -->
          <div class="p-centered"></div>

          <!-- m-1 {margin: 4px;} m-2 {margin: 8px;} -->
          <div class="m-1"></div>
          <div class="m-2"></div>
          <!-- margin in 4 directions. mt-1 {margin-top: 4px;} mt-2 {margin-top: 8px;} -->
          <div class="mt-1"></div>
          <div class="mt-2"></div>
          <!-- mx-1 {margin-left: 4px; margin-right: 4px;} -->
          <div class="mx-1"></div>
          <div class="mx-2"></div>
          <div class="my-1"></div>
          <div class="my-2"></div>
          <!-- p-1 {padding: 4px;} p-2 {padding: 8px;} -->
          <div class="p-1"></div>
          <div class="p-2"></div>
          <!-- padding in 4 directions. pt-1 {padding-top: 4px;} pt-2 {padding-top: 8px;} -->
          <div class="pt-1"></div>
          <div class="pt-2"></div>
          <!-- px-1 {padding-left: 4px; padding-right: 4px;} -->
          <div class="px-1"></div>
          <div class="px-2"></div>
          <div class="py-1"></div>
          <div class="py-2"></div>

    include ../_layout/_ad-c.pug

  include ../_layout/_footer.pug