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

[#7] 공통 컴포넌트(Header, Footer, ScrollFloatBtn) 구현, [#9] 랜딩페이지 구현 #12

Merged
merged 12 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions components/shared/styled/layout.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Link from 'next/link';
import styled from 'styled-components';

export const BoxFlexCenter = styled.div`
Expand All @@ -9,6 +10,30 @@ export const BoxFlexCenter = styled.div`

export const MaxContainer = styled.div`
position: relative;
width: 100%;
max-width: 1200px;
margin: 0 auto;
`;

export const UnorderList = styled.ul`
display: flex;
align-items: center;
`;

export const LinkWrapper = styled(Link)`
text-decoration: none;
cursor: pointer;
`;

type ImageBoxProps = {
width: string;
height: string;
backgroundImageSrc: string;
};

export const ImageBox = styled.div<ImageBoxProps>`
width: ${({ width }) => width};
height: ${({ height }) => height};
background: ${({ backgroundImageSrc, theme }) => (backgroundImageSrc ? `url(${backgroundImageSrc})` : theme.colors.gray_001)};
background-repeat: no-repeat;
`;
15 changes: 15 additions & 0 deletions styles/GlobalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,21 @@ const GlobalStyle = styled.createGlobalStyle`
/* Internet Explorer 10+ */
color: transparent;
}

// Web Accessibility Styles - IR
.visually-hidden {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: 0;
border: 0;
overflow: hidden;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
clip: rect(1px, 1px, 1px, 1px); /*maybe deprecated but we need to support legacy browsers */
clip-path: inset(50%); /*modern browsers, clip-path works inwards from each corner*/
white-space: nowrap; /* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */
}
Comment on lines +202 to +216
Copy link
Member

Choose a reason for hiding this comment

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

IR 기법에 대해서는 생각해본 적이 없었는데, 새롭네요,, 배워갑니다 💨 아래는 내가 참고한 자료들,, 나중에 필요하면 다시 살펴보려구용
https://snupi.tistory.com/109

https://velog.io/@wltnrms0629/HTMLCSS-%EC%9B%B9-%EC%A0%91%EA%B7%BC%EC%84%B1%EC%9D%B4%EB%AF%B8%EC%A7%80-%ED%91%9C%ED%98%84-IR%EA%B8%B0%EB%B2%95

Copy link
Member Author

Choose a reason for hiding this comment

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

웹 접근성에 대해서는 나도 아직 공부해야할 게 더 많아용 ㅋㅋ,,
이런 존재부터 아는 게 중요하다고 생각해요 ~ 👍

`;

export default GlobalStyle;