jonsuh/hamburgers là một trong những repo tập trung giao diện mà TopGit theo dõi, hiện có 7.1k sao, viết chủ yếu bằng SCSS. Tasty CSS-animated Hamburgers
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Hamburgers is a collection of tasty CSS-animated hamburger icons. Also included is the source as a Sass library. It’s modular and customizable, so cook up your own hamburger.
Table of Contents
Usage
Sass
Customization
Accessibility
Browser Support
Usage
Download and include the CSS in the <head> of your site:
Since the class name would have to be toggled via JavaScript and implementation would differ based on the context of how you plan on using the hamburger, I’m going to leave the rest up to you.
Sass
.scss source files are available if you use Sass as your CSS precompiler. It’s customizable and modular.
Here is the full list of default settings (found in _sass/hamburgers/hamburgers.scss);
$hamburger-padding-x : 15px;
$hamburger-padding-y : 15px;
$hamburger-layer-width : 40px;
$hamburger-layer-height : 4px;
$hamburger-layer-spacing : 6px;
$hamburger-layer-color : #000;
$hamburger-layer-border-radius : 4px;
$hamburger-hover-opacity : 0.7;
$hamburger-active-layer-color : $hamburger-layer-color;
$hamburger-active-hover-opacity: $hamburger-hover-opacity;
// To use CSS filters as the hover effect instead of opacity,
// set $hamburger-hover-use-filter as true and
// change the value of $hamburger-hover-filter accordingly.
$hamburger-hover-use-filter : false;
$hamburger-hover-filter : opacity(50%);
$hamburger-active-hover-filter: $hamburger-hover-filter;
// Remove or comment out the hamburger types you don’t want
// or need, so they get excluded from the compiled CSS.
$hamburger-types: (
3dx,
3dx-r,
3dy,
3dy-r,
3dxy,
3dxy-r,
arrow,
arrow-r,
arrowalt,
arrowalt-r,
arrowturn,
arrowturn-r,
boring,
collapse,
collapse-r,
elastic,
elastic-r,
emphatic,
emphatic-r,
minus,
slider,
slider-r,
spring,
spring-r,
stand,
stand-r,
spin,
spin-r,
squeeze,
vortex,
vortex-r
);
ems or rems
Wanna work with ems or rems instead of px? Just change all the px values to the unit of your choice. Note: Be consistent (all px or all ems), otherwise it may break—the math behind the customization will fail if it attempts to perform operations with values of different units.
Not satisfied?
Dig into _base.scss or types/ and customize to your heart’s content. Fair warning: It‘s pretty delicate and may break, especially if you tweak the animations themselves.
Accessibility
Hamburger menu icons can be useful in the right context, but they’re not the most accessible.
ARIA will help make it accessible to people with disabilities.
You will need JavaScript to toggle between aria-expanded attribute being set to true and false, as this will indicate to visually impaired users whether the menu is opened or closed.
The hamburger button belongs inside the <nav> so that assistive technologies will be able to locate the navigation, and to allow these users to easily locatate the hamburger button, without having to search up and down the DOM, once they realize they've found themselves in an empty navigation.
If you insist on using <div>s, by default they’re not focusable (i.e. via keyboard or assistive technology). Add the tabindex attribute alongside ARIA. You will also need to recreate expected keyboard functionality for these <div>s. Using JavaScript, you will need to make sure that both Space and Enter will toggle the hamburger states.
Here are some resources on web accessibility and ARIA.
Browser Support
Animations use CSS3 3D transforms (translate3d whenever possible for GPU acceleration), which is supported by most browsers (not supported by IE9 and older and Opera Mini). For detailed browser support, check caniuse.com.
jonsuh/hamburgers thuộc nhóm Frontend trên TopGit, cùng 5 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về jonsuh/hamburgers ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/jonsuh/hamburgers là nguồn chính thức.
jonsuh/hamburgers có bao nhiêu sao?
jonsuh/hamburgers có 7.1k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/jonsuh/hamburgers. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
jonsuh/hamburgers có phải mã nguồn mở không?
Có — jonsuh/hamburgers phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/jonsuh/hamburgers.
jonsuh/hamburgers có trang demo không?
Dự án có trang chủ ở https://jonsuh.com/hamburgers. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
jonsuh/hamburgers là gì?
jonsuh/hamburgers (jonsuh/hamburgers) là dự án SCSS trên GitHub. Theo mô tả gốc: Tasty CSS-animated Hamburgers
jonsuh/hamburgers so với các dự án Frontend khác thế nào?
jonsuh/hamburgers được TopGit xếp vào nhóm Frontend, với 7.1k sao GitHub và viết bằng SCSS. Xem trang chủ đề Frontend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc đầy đủ README ở tab phía trên.
hamburgers có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về hamburgers.