Skip to content

Instantly share code, notes, and snippets.

Avatar

Shinyu Murakami MurakamiShinyu

View GitHub Profile
@MurakamiShinyu
MurakamiShinyu / dabblet.css
Created March 13, 2015 10:51
Flex centering
View dabblet.css
/**
* Flex centering
*/
body {
display: flex;
border: outset blue;
margin: 0;
text-align: center;
height: 100vh;
box-sizing: border-box;
@MurakamiShinyu
MurakamiShinyu / dabblet.css
Last active February 3, 2019 01:26
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
View test-pageheader-footnote.html
<!DOCTYPE html>
<html>
<head>
<title>Test: Page Header + Footnote</title>
<style>
.footnote {
float: footnote;
}
@page {
@top-center {
View test-pageheader-pagebottomfloat.html
<!DOCTYPE html>
<html>
<head>
<title>Test: Page Header + Page Bottom Float</title>
<style>
.pagebottomfloat {
float: bottom;
float-reference: page;
}
@page {
View link-to-vivliostyle-view-sample.html
@MurakamiShinyu
MurakamiShinyu / cssLogical.pl
Created November 26, 2019 14:27
Convert CSS non-logical properties to logical properties
View cssLogical.pl
#!/usr/bin/perl
while (<>) {
s/(?<![^;{\s])(margin|padding|border)-top:/$1-block-start:/g;
s/(?<![^;{\s])(margin|padding|border)-right:/$1-inline-end:/g;
s/(?<![^;{\s])(margin|padding|border)-bottom:/$1-block-end:/g;
s/(?<![^;{\s])(margin|padding|border)-left:/$1-inline-start:/g;
s/(?<![^;{\s])border-top-(color|style|width):/border-block-start-$1:/g;
s/(?<![^;{\s])border-right-(color|style|width):/border-inline-end-$1:/g;
s/(?<![^;{\s])border-bottom-(color|style|width):/border-block-end-$1:/g;
s/(?<![^;{\s])border-left-(color|style|width):/border-inline-start-$1:/g;
View table-variable-n-of-cells-in-rows.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test: Table with variable number of cells in rows</title>
<style>
table,
td {
border: 1px solid;
View EquivalentUnifiedIdeograph-modified.txt
# EquivalentUnifiedIdeograph-modified.txt
#
# Modified by Shinyu Murakami <murakami@vivliostyle.org>
# for use to correct CJK text in Chrome-generated PDFs.
# see https://github.com/vivliostyle/vivliostyle-cli/issues/40
#
# The original version is: https://www.unicode.org/Public/13.0.0/ucd/EquivalentUnifiedIdeograph.txt
#
# Modifications:
# - Put a parenthesized character after each code point for human readability