Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

1.6 KB
Raw Blame

/* Widths in px */
$very-very-tiny: 400px;
$tiny: 600px;
$small: 780px;
$medium: 1150px;
$large: 1780px;
$extra-large: 2800px;

/* Usage @include tablet { ... } */

@mixin very-tiny-phone {
  @media (width < #{$very-very-tiny}) {
    @content;
  }
}

@mixin phone {
  @media (width < #{$tiny}) {
    @content;
  }
}

@mixin tablet {
  @media (#{$tiny} <= width < #{$small}) {
    @content;
  }
}

@mixin laptop {
  @media (#{$small} <= width < #{$medium}) {
    @content;
  }
}

@mixin monitor {
  @media (#{$medium} <= width < #{$large}) {
    @content;
  }
}

@mixin big-screen {
  @media (min-width: #{$large}) {
    @content;
  }
}

@mixin phone-up {
  @media (min-width: #{$tiny}) {
    @content;
  }
}
@mixin tablet-up {
  @media (min-width: #{$small}) {
    @content;
  }
}
@mixin laptop-up {
  @media (min-width: #{$medium}) {
    @content;
  }
}
@mixin monitor-up {
  @media (min-width: #{$large}) {
    @content;
  }
}
@mixin big-screen-up {
  @media (min-width: #{$extra-large}) {
    @content;
  }
}

@mixin tablet-down {
  @media (width < #{$small}) {
    @content;
  }
}

@mixin safari {
  _::-webkit-full-page-media, _:future, :root .safari_only {
    @content;
  }
}

/* Heights in px  for compact landscape viewports @include short to hide non-essential chrome */
$short-height: 740px;
$tall-height: 1000px;

@mixin short {
  @media (height < #{$short-height}) {
    @content;
  }
}

@mixin short-up {
  @media (min-height: #{$short-height}) {
    @content;
  }
}

@mixin tall {
  @media (min-height: #{$tall-height}) {
    @content;
  }
}