Skip to content

Instantly share code, notes, and snippets.

@dev4design
Last active June 12, 2024 19:18
Show Gist options
  • Save dev4design/43c487554df790fddbc1eb79b9ad46a5 to your computer and use it in GitHub Desktop.
Save dev4design/43c487554df790fddbc1eb79b9ad46a5 to your computer and use it in GitHub Desktop.
<?php
// Pretendard 글꼴 Import
function custom_font_pretendard() {
wp_enqueue_style( 'custom_font_style', 'https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css', false );
}
add_action( 'wp_enqueue_scripts', 'custom_font_pretendard' );
// Pretendard 글꼴을 Jetcraft 콤포넌트 요소에만 적용
add_action( 'wp_head', function () { ?>
<style>
/* 스타일 동기 */
.jetcraft-comp {
font-family: "Pretendard Variable", sans-serif !important;
font-size: 16px;
line-height: 1.5;
}
.jetcraft-comp * {
font-family: inherit !important;
}
/* 엘레멘터 편집화면 불필요 여백 제거 */
.elementor-edit-area-active .elementor-inline-editing {
min-height: 0;
}
/* HTML 위젯 감춤 */
.jetcraft-settings {
display: none;
visibility: hidden;
width: 0;
height: 0;
}
/* Section 템플릿에서 타이틀 헤더 감춤(리더기 제외) */
.elementor-editor-active .page-header {
visibility: hidden !important;
width: 0;
height: 0;
}
/* 그리드 */
.jetcraft-testing-grid .grid-16 {
background-image:
linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 9px, rgba(27, 31, 36, 0.1), rgba(255, 255, 255, 0) 10px),
linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 9px, rgba(27, 31, 36, 0.1), rgba(255, 255, 255, 0) 10px);
background-size: 16px 16px;
background-position-x: calc(50% - 1px);
background-position-y: -6px;
}
.jetcraft-testing-grid .grid-128 {
background-image:
linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 12px, rgba(27, 31, 36, .08), rgba(255, 255, 255, 0) 13px),
linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 12px, rgba(27, 31, 36, .08), rgba(255, 255, 255, 0) 13px);
background-size: 128px 128px;
background-position-x: calc(50% - 12px);
background-position-y: 13px;
}
.jetcraft-testing-grid.jet-grid-off {
display: none;
visibility: hidden;
width: 0;
height: 0;
}
</style>
<?php } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment