Code · 1 file

Sample Less File

A Less stylesheet with variables, mixins, nesting and color functions. Every language sample implements the same small program so you can compare them side by side.

Less · 488 B

Sample Less file

An idiomatic Less example — the same customer program (or, for hardware languages, a small counter design) we offer in every language.

CC0 · free for any use · Verified by an independent tool · Report a problem

sample.less — first linesLess
// Sample Less stylesheet — samplefiles.com
@ink: #191919;
@accent: #a24c2a;
@radius: 8px;

.card-base(@pad: 16px) {
  padding: @pad;
  border: 1px solid fade(@ink, 15%);
  border-radius: @radius;
}

.customer-card {
  .card-base(20px);
  color: @ink;

  &__name {
    font-weight: 600;
  }

  &--vip {
    border-color: @accent;

    .badge {
      color: darken(@accent, 10%);
      background: lighten(@accent, 45%);

File details

Size
488 B (488 bytes)
MIME type
text/x-less
SHA-256
90f112eeaff2968eb2cf48372817712ba4af187b89f8e52e444a9a645c194392
MD5
159bc0e341d0455e7b557576641a98ab

Download from the command line

curl -L -o sample.less https://files.samplefiles.com/code/less/sample.less

Or check the download in your browser with the checksum calculator.