【CSS】様々なサイトに使える初期設定basic.scss
2025.07.01
basic.scss
@charset "UTF-8";
/* フォント指定 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&display=swap");
$base_font: "Noto Sans JP";
/* カラー指定 */
$base_color: #000;
$bc: #000;
$wc: #fff;
/* レスポンシブ指定 */
// @media screen and (max-width: $sp) {}
$sp: 1000px;
// @media screen and (min-width: $pc) {}
$pc: 1001px;
/* PC・SPで表示・非表示 */
.sp_only {
display: none !important;
@media screen and (max-width: $sp) {
display: inline !important;
}
}
.pc_only {
display: inline !important;
@media screen and (max-width: $sp) {
display: none !important;
}
}
/* ページ内リンクの指定 */
div.map_link_area {
position: relative;
z-index: 0;
}
hr {
height: 0;
border: none;
&.map_link {
position: absolute;
top: -140px;
border: none;
font-size: 0;
@media screen and (max-width: $sp) {
top: -80px;
}
}
}
/* PCでは電話番号をリンクと認識させない */
a[href*="tel:"] {
pointer-events: none;
@media screen and (max-width: $sp) {
pointer-events: auto;
}
}
/* 主なクラスに指定 */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
line-height: normal;
box-sizing: border-box;
font-family: $base_font;
}
/******************************************************************************* Setting */