Skip to content

Instantly share code, notes, and snippets.

View tak-dcxi's full-sized avatar
🏠
Working from home

TAK tak-dcxi

🏠
Working from home
View GitHub Profile
@tak-dcxi
tak-dcxi / _accordion.scss
Last active December 23, 2020 17:15
My Accordion
.my-accordion {
font-size: 1rem;
max-width: 640px;
word-break: break-all;
}
.my-accordion__item {
border: #ddd 1px solid;
& + & {
@tak-dcxi
tak-dcxi / _news-ticker.scss
Last active December 23, 2020 17:18
Pure CSS News Ticker
.news-ticker {
align-items: center;
background-color: #fafafa;
border-left: 16px solid #7f7f7f;
box-sizing: border-box;
display: flex;
font-size: 1rem;
margin: auto;
max-width: 960px;
padding: 1.5em;
@tak-dcxi
tak-dcxi / _checkbox.scss
Last active December 23, 2020 17:25
My Custom Checkbox
.my-checkbox {
align-items: center;
cursor: pointer;
display: inline-flex;
}
.my-checkbox__input {
// a11y-css-resetから引用
// https://github.com/mike-engel/a11y-css-reset
border: 0;
@tak-dcxi
tak-dcxi / .markdown
Created December 30, 2020 19:04
フォームテンプレート
@tak-dcxi
tak-dcxi / drawer-menu-pattern-1.markdown
Created January 14, 2021 23:38
Drawer Menu Pattern 1
@tak-dcxi
tak-dcxi / drawer-menu-pattern-2.markdown
Created January 14, 2021 23:41
Drawer Menu Pattern 2
@tak-dcxi
tak-dcxi / index.html
Created April 26, 2021 05:43
GetPolyfill
<head>
<script>
function getPolyfill(src, integrity) {
var script = document.createElement('script')
script.src = src
script.integrity = integrity
script.crossOrigin = 'anonymous'
script.defer = true
document.head.appendChild(script)
}
@tak-dcxi
tak-dcxi / Breadcrumbs.tsx
Last active December 2, 2021 17:11
Next.jsにおけるパンくずリストの実装例
import React from 'react'
import Link from 'next/link'
type PageBreadcrumbsPropsType = {
lists: { [key: string]: string }[]
}
export const PageBreadcrumbs: React.VFC<PageBreadcrumbsPropsType> = ({ lists }) => {
return (
<nav aria-label="現在位置">
/**
* 「WHATWG Standard」のAutoFillについての仕様に記載されている項目を配列化したものです。
* @example
* <input
* name={name}
* autoComplete={autoFillList.some((item) => item === name) ? name : null}
* />
*/
export const autoFillList = [