Skip to content

Instantly share code, notes, and snippets.

View Lego2012's full-sized avatar

Leo Merkel Lego2012

View GitHub Profile

The Setup

Before you can sync, you need to add a remote that points to the upstream repository. You may have done this when you originally forked.

Tip: Syncing your fork only updates your local copy of the repository; it does not update your repository on GitHub.

$ git remote -v
## List the current remotes
origin  https://github.com/user/repo.git (fetch)
origin https://github.com/user/repo.git (push)
/* The user setting decides about the mode */
html {
   color-scheme: light dark;
}

body {
   font-family: system-ui;
   font-size: 1.125rem;
 line-height: 1.6;
---
---

<footer>
    <small>
        Copyright &copy; <span id="copyright"></span>
        All rights reserved
    </small>

Method to quickly define variables:

---
const foregroundColor = "hsl(20, 50%, 50%)";
const backgroundColor = "hsl(200, 50%, 50%)";
---

<style define:vars={{ foregroundColor, backgroundColor }}>
 p {

If visible, show:

---
const isVisible = false;
---

{
    isVisible &&
 {obj.favorites[1].toUpperCase()}
---
const obj = {
    name: str,
    number: num,
    favorites: ["astro", "css", "js"]
}
---
<h1>{obj.favorites[1].toUpperCase()}</h1>

CodePen

The solution is named lines.

.content-grid {
   display: grid;
 grid-template-columns: 1fr [content-start] 1fr [content-end] 1fr;

Kevin Powell: A better image reset for your CSS

img {
   font-style: italic;

   background-repeat: no-repeat;
   background-size: cover;

 shape-margin: 1rem;
h1 {
   max-inline-size: var(--size-header-3);
   margin-inline: auto;
}