Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: @kth/style 10 #357

Closed
wants to merge 5 commits into from
Closed

feat: @kth/style 10 #357

wants to merge 5 commits into from

Conversation

belanglos
Copy link
Contributor

@belanglos belanglos commented Feb 21, 2024

Migrate to KTH Style 10

Install dependencies

  • npm i kth-style@10-latest
  • npm i @kth/style@latest
  • npm i @kth/kth-node-web-common@9

Setup environment

Memo page adjustments

TODO: Use handlebar helper to render breadcrumbs.

Style organization

  • Extracted table styles to _table.scss.
  • Extracted print-specific (e.g. @media print) styles to _print.scss.

Typography

  • Referenced Typograhy.
  • Added @import "~@kth/style/scss/tokens/typography.scss";.
  • Removed font-family in kurs-pn-web.scss.
  • Added article { @include prose.prose; } rule.
  • Evaluated use of font-size:
    • short-text-font-style is used in table div:s and sub-section-header. It’s aimed to keep font-size and line-height slightly smaller. I removed the styling, but kept the html as is.
    • long-text-font-style is used for p and li in content-center. It seems to mostly have played out it’s role and was removed.
    • Removed font-size: 1rem; from page-sub-heading-admin-link and @media width related related rules for various p and li.
    • Styled h3 in info-box as a h4 with @include font-heading-s.
    • Kept font-size for @media print.

TODO: How should we deal with font-size for sub-section-header?

Colors

  • Referenced Colors.
  • Add theme: 'student-web' to all res.render in controllers.
  • Evaluated use of color, border-color, and background-color:
    • Add @include theme-student-web to table and .info-box.
    • $grey: #65656c is used for table header backgrounds. I replaced it with the darker color $color-gray-dark.
    • $lightGrey: #f6f6f6 is used as td background-color. I replaced it with $color-gray-lighter.
    • $white: #fff is used as:
      • color for th, tr, and td. Switched it to --color-on-primary.
      • border color for th, var(--color-border), and tr. Switched it to --color-border.
      • color for h4 and p inside tr. Switched it to --color-on-primary.
    • .info-box had background-color: #f4f4f4. Switched it to --color-background-alt.
    • Removed background-color for #page-sub-heading-wrapper.
    • Removed unused menu-memos.
    • Removed body background-color for @media print.
    • Links in side menu has class .nav-link.active with color set to black. Changed it to --color-text.

TODO: The side menu needs to be updated after redesign in Cortina.

Spacing

  • See Spacing.
  • TODO: Analyze use of margins and paddings.

<form action="https://kth.se/search" method="get">
<div class="kth-search">
<label for="search-input">Sök på Studentwebben</label>
<input
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this be wrapped inside a cortina-block?

@karlandindrakryggen
Copy link
Contributor

#373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants