{"id":17951992,"url":"https://github.com/joshwcomeau/css-for-js-flow-layout","last_synced_at":"2025-04-03T16:22:05.692Z","repository":{"id":66128865,"uuid":"315679233","full_name":"joshwcomeau/css-for-js-flow-layout","owner":"joshwcomeau","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-27T02:10:26.000Z","size":506,"stargazers_count":14,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T06:09:23.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshwcomeau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-24T15:47:34.000Z","updated_at":"2024-02-21T14:14:57.000Z","dependencies_parsed_at":"2023-02-21T20:31:11.204Z","dependency_job_id":null,"html_url":"https://github.com/joshwcomeau/css-for-js-flow-layout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshwcomeau%2Fcss-for-js-flow-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshwcomeau%2Fcss-for-js-flow-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshwcomeau%2Fcss-for-js-flow-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshwcomeau%2Fcss-for-js-flow-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshwcomeau","download_url":"https://codeload.github.com/joshwcomeau/css-for-js-flow-layout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247034054,"owners_count":20872595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T09:53:37.045Z","updated_at":"2025-04-03T16:22:05.670Z","avatar_url":"https://github.com/joshwcomeau.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Huckleberry Agency Website\n\nIn this workshop, you'll build a minimal landing page for an agency.\n\nThis mockup is built entirely using _flow layout_: no Flexbox, no grid, no absolute positioning. It relies heavily on padding, margin, and border.\n\n## Mockups\n\nDesktop:\n\n\u003cimg alt=\"Desktop-sized screenshot of an agency landing page\" src=\"./docs/huckleberry-desktop.png\" style=\"\" /\u003e\n\nTablet:\n\n\u003cimg alt=\"Desktop-sized screenshot of an agency landing page\" src=\"./docs/huckleberry-tablet.png\" style=\"max-width: 400px;\" /\u003e\n\nMobile:\n\n\u003cimg alt=\"Desktop-sized screenshot of an agency landing page\" src=\"./docs/huckleberry-mobile.png\" style=\"max-width: 300px;\" /\u003e\n\n## Setup Instructions\n\nThis project uses Parcel, to provide a development server with lightning-quick hot-reload.\n\nStart by installing dependencies:\n\n```\nnpm install\n```\n\nBoot up a dev server:\n\n```\nnpm run start\n```\n\nYou should see a confirmation message like this:\n\n![Screenshot of a terminal, showing a server running at http://localhost:1234](./docs/success.png)\n\nYou can visit `http://localhost:1234` to view the page. You should see a bunch of unstyled content:\n\nTODO screenshot\n\n## Getting Started Notes\n\n- You're given a decent start in terms of the HTML markup, but not much in the way of styles. You'll be expected to edit `style.css` to implement the styles. You can also edit `index.html` if you wish, though it should be possible to solve this project touching only `style.css`.\n\n- Don't worry too much about \"best practices\". Later in this course, we'll see how to create scalable encapsulated styles. For now, the goal is simply to implement the designs in the screenshots, with whatever organizational strategy comes most naturally to you.\n\n- You may be tempted to reach for CSS strategies we haven't yet seen in the course, like flexbox or absolute positioning. Please try and complete this workshop without them. This module is focused on flow-layout and the box-model, and it is possible to lay everything out on the page using only padding, border, and margin. It's important to be comfortable with these primitives before moving on to more-complex subjects.\n\n- Future workshops will provide a React starter. For the early workshops, the focus is on the fundamentals, so we're using pure HTML and CSS. If you're more comfortable working in React (or another framework), feel free to use it instead.\n\n- **Pay close attention to the details.** For example, you should be able to draw a line along the left, and all text should be neatly aligned:\n\n![Desktop mockup with a vertical line showing alignment](./docs/aligned.png)\n\nThat said: Don't worry if you can't create a pixel-perfect recreation. In the solution video, I'll show you exactly how I did it. Spend an hour or so on this project, and submit whatever you have at that point.\n\n## Design tokens\n\nIn the early days of the web, sites would be built largely on \"feel\". Colors and sizes would be chosen based on the whims of the moment. This led to some very inconsistent-looking websites!\n\nNowadays, it's common to have a set of _design tokens_. A design token is a value that can be reused. Typically it's part of a collection or a scale.\n\nWe'll learn more about this idea later, but for now, you can copy/paste the values from this list as-needed. Don't worry about being DRY or using variables; Plop these values in, wherever you need them.\n\n**If you find it difficult to use these tokens, or if you're not able to achieve a result you're happy with, don't worry about it.** Solve it however you can, and then watch the solution video to see how I did it.\n\n### Spacing\n\nThis app uses an 8px unit. All spaces are a multiple of 8px:\n\n- `8px`\n- `16px`\n- `24px`\n- `32px`\n- `48px`\n- `64px`\n- `96px`\n- `128px`\n\nWhen it comes to max widths (eg. the maximum width of the card), arbitrary values can be used.\n\n### Font\n\n1 font is used in this project: `Lato`. It is already included in the stylesheet.\n\nFor font sizes, the `rem` unit should be used The scale is:\n\n- `1rem`\n- `1.25rem`\n- `1.5rem`\n- `2rem`\n\nBecause the base font size is 18px, this works out in pixels to:\n\n- `18px`\n- `22.5px`\n- `27px`\n- `36px`\n\n### Color palette\n\nPrimary (green):\n\n- `hsl(160deg, 100%, 30%)`\n\nSecondary (gold):\n\n- `hsl(45deg, 100%, 50%)` (lighter)\n- `hsl(45deg, 100%, 40%)` (darker)\n\nGrays:\n\n- `hsl(0deg, 0%, 0%)` (black)\n- `hsl(0deg, 0%, 10%)` (very dark)\n- `hsl(0deg, 0%, 30%)` (dark)\n- `hsl(0deg, 0%, 40%)` (medium)\n- `hsl(0deg, 0%, 60%)` (light)\n- `hsl(0deg, 0%, 100%)` (white)\n\n\u003e What the HSL?\n\u003e\n\u003e You may be more familiar with color values in hexidecimal format, like `#FF0000`. In this course, we'll focus almost entirely on colors in a different format: HSL.\n\u003e\n\u003e We'll learn more about this format in a future module, but for now, you can use them interchangeably with hex values. For example:\n\n```css\n.something {\n  background: hsl(45deg, 100%, 50%);\n  border-bottom: 4px solid hsl(245deg, 100%, 55%);\n}\n```\n\n## Submissions\n\nWorkshops are submitted through the course platform. Commit your changes, push them to your fork, and submit the link by clicking the \"Complete lesson\" button on the workshop page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshwcomeau%2Fcss-for-js-flow-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshwcomeau%2Fcss-for-js-flow-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshwcomeau%2Fcss-for-js-flow-layout/lists"}