Skip to content
Snippets Groups Projects
Select Git revision
  • 56ebe08b90860f353a20435bd1e533f77083904d
  • master default protected
  • feat/new-image-formats
  • clickable-select-chevron
  • 2.20.0
  • 2.19.0
  • 2.18.0
  • 2.17.0
  • 2.16.1
  • 2.16.0
  • 2.15.0
  • 2.14.0
  • 2.13.0
  • 2.12.1
  • 2.11.0
  • 2.10.0
  • 2.9.1
  • 2.9.0
  • 2.8.0
  • 2.7.1
  • 2.7.0
  • 2.6.0
  • 2.5.2
  • 2.5.1
24 results

candidate-card.pcss

Blame
  • user avatar
    xaralis authored
    d58883bc
    History
    candidate-card.pcss 2.22 KiB
    .candidate-card__body {
      @apply grid;
    
      grid-template-areas: "avatar bio"
                           "affiliation affiliation"
                           "social social";
      /* Needs to match .candidate-card__avatar width */
      grid-template-columns: theme("width.24") 1fr;
    }
    
    .candidate-card__avatar {
      @apply relative w-24 pl-4 py-4;
      grid-area: avatar;
    }
    
    .candidate-card__position {
      @apply w-8 h-8 absolute bg-black text-white text-base rounded-full font-normal font-alt text-center;
      top: 1rem;
      left: 0.5rem;
      line-height: 2rem;
    }
    
    .candidate-card__bio {
      @apply p-4;
    }
    
    .candidate-card__bio-item {
      @apply font-light font-condensed;
    }
    
    .candidate-card__affiliation {
      /* No vertical padding, proper spacing guaranteed by leading-10 - we do not expect line breaks here. */
      @apply text-sm bg-grey-50 flex border-t border-b border-grey-125 leading-10;
    
      > div {
        @apply px-4 flex items-center;
    
        &:not(:first-child) {
          @apply border-l border-grey-125;
        }
    
        &:last-child {
          flex: 1;
        }
    
        &:first-child {
          @apply w-24 justify-center;
        }
    
        @screen md {
          @apply justify-center;
    
          &:first-child {
            @apply w-auto text-left;
          }
        }
      }
    }
    
    .candidate-card__bio {
      grid-area: bio;
    }
    
    .candidate-card__affiliation {
      grid-area: affiliation;
    }
    
    .candidate-card__social {
      @apply p-4;
      grid-area: social;
    
      @screen md {
        @apply text-center;
      }
    }
    
    @screen sm {
      .candidate-card {
        @apply flex flex-col h-full;
        padding-top: 3rem;
      }
    
      .candidate-card__body {
        @apply text-center;
        grid-template-areas: "avatar"
                             "bio"
                             "affiliation"
                             "social";
        grid-template-columns: 1fr;
      }
    
      .candidate-card__bio {
        @apply p-4;
        /* This adjusts the height to keep other parts (like affiliation) uniformly
        aligned one to another. Adjustment is necessary in case of longer
        names/descriptions. */
        min-height: 10rem;
      }
    
      .candidate-card__avatar {
        @apply inline-block relative m-auto w-32 py-0;
        margin-top: -3rem;
      }
    
      .candidate-card__position {
        @apply w-10 h-10 text-xl;
        top: 1.75rem;
        left: -0.5rem;
        line-height: 2.5rem;
      }
    
      .candidate-card__social {
        @apply flex-grow;
      }
    }