Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CSS
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
4D Japan
August 01, 2020
Technology
32
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSS
4D Japan
August 01, 2020
More Decks by 4D Japan
See All by 4D Japan
4D 21 R2 R3
miyako
0
34
4D 21 LTS
miyako
0
18
4D 21
miyako
0
47
4D 20 R10
miyako
0
53
4D 20 R9
miyako
0
45
4D 20 R7 & R8
miyako
0
90
Unicodeの話 (2007)
miyako
0
55
Unicodeの話 (2008)
miyako
0
62
Google Apps Integration (2012)
miyako
0
59
Other Decks in Technology
See All in Technology
夫婦で子育てするための育児標準化
codmoninc
PRO
0
330
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
340
Rust で関数型ドメインモデリング
takonda
0
140
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
580
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
150
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
Skip the Path - Find Your Career Trail
mkilby
1
260
Bash Introduction
62gerente
615
220k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Building AI with AI
inesmontani
PRO
1
1.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Between Models and Reality
mayunak
4
500
A better future with KSS
kneath
240
18k
Transcript
4DϑΥʔϜͱCSS 4D Summit 2020
࣍ • CSSΛ༻͢Δཧ༝ • αϙʔτ͞ΕΔଐੑ/͞Εͳ͍ଐੑ • όΠφϦʔ͔ΒϓϩδΣΫτ • CSSηϨΫλʔ •
ద༻ͷ༏ઌॱҐ • σβΠϯ্ͷ੍ • σϞϯετϨʔγϣϯ
CSSΛ༻͢Δཧ༝
CSSΛ༻͢Δཧ༝ όΠφϦʔ σʔλϕʔε ϓϩδΣΫτ σʔλϕʔε
CSSΛ༻͢Δཧ༝ • ͘Ұൠతʹ༻͞Ε͍ͯΔ .button { font-family: Arial; font-size: 12px; color:
#CCC; } input { Background-color: #333;
CSSΛ༻͢Δཧ༝ • ͘Ұൠతʹ༻͞Ε͍ͯΔ • JSON ΦϒδΣΫτه๏ͱۙ ͍ܗࣜΛ͍ͯ͠Δ .button { font-family:
Arial; font-size: 12px; color: #CCC; } input { Background-color: #333; button: { fontFamily: Arial, fontSize: 12, stroke: #CCC } input: { fill: #333
CSSΛ༻͢Δཧ༝ • ͘Ұൠతʹ༻͞Ε͍ͯΔ • JSON ΦϒδΣΫτه๏ͱۙ ͍ܗࣜΛ͍ͯ͠Δ • ඪ४ςΩετܗࣜͰ͋Δ A
αϙʔτ͞ΕΔଐੑɾ αϙʔτ͞Εͳ͍ଐੑ
αϙʔτ͞ΕΔଐੑ 4D CSS borderStyle fill fontFamily fontSize fontStyle fontWeight stroke
textAlign textDecoration verticalAlign border-style background-color font-family font-size font-style font-weight color text-align text-decoration vertical-align
αϙʔτ͞ΕΔଐੑ 4D CSS borderStyle fill fontFamily fontSize fontStyle fontWeight stroke
textAlign textDecoration verticalAlign border-style background-color font-family font-size font-style font-weight color text-align text-decoration vertical-align
αϙʔτ͞ΕΔଐੑ
αϙʔτ͞Εͳ͍ଐੑ 1. CSSηϨΫλʔͱͯࣝ͠ผ͞ ΕΔଐੑ type: “…”, class: “…”,
αϙʔτ͞Εͳ͍ଐੑ 1. CSSηϨΫλʔͱͯࣝ͠ผ͞ ΕΔଐੑ 2. ܭࢉ͢Δඞཁͷ͋Δଐੑ method: “…”,
αϙʔτ͞Εͳ͍ଐੑ 1. CSSηϨΫλʔͱͯࣝ͠ผ͞ ΕΔଐੑ 2. ܭࢉ͢Δඞཁͷ͋Δଐੑ 3. શͯͷϑΥʔϜଐੑ windowMaxHeight: “…”,
windowTitle: “…”, Etc.
αϙʔτ͞Εͳ͍ଐੑ 1. CSSηϨΫλʔͱͯࣝ͠ผ͞ ΕΔଐੑ 2. ܭࢉ͢Δඞཁͷ͋Δଐੑ 3. શͯͷϑΥʔϜଐੑ 4. ͕ྻJSONϙΠϯλʔͱ
ͯ͠ࢦఆ͞Ε͍ͯΔଐੑ choiceList: […], excludedList: […], events: […], list: { $ref: … }
όΠφϦʔ͔Β ϓϩδΣΫτ
όΠφϦʔ͔ΒϓϩδΣΫτ όΠφϦʔϞʔυ styleSheets_mac.css styleSheets_windows.css
όΠφϦʔ͔ΒϓϩδΣΫτ ϓϩδΣΫτϞʔυ
όΠφϦʔ͔ΒϓϩδΣΫτ ϓϩδΣΫτϞʔυ
όΠφϦʔ͔ΒϓϩδΣΫτ 1. ελΠϧγʔτΛ༻͠ͳ͍ΦϒδΣΫτ 2. ελΠϧγʔτΛ༻͢ΔΦϒδΣΫτ
όΠφϦʔ͔ΒϓϩδΣΫτ ελΠϧγʔτΛ༻͠ͳ͍ΦϒδΣΫτ 1 2 3 4 5
"objects": { "Text": { "type": "text", "top": 24, "left": 23,
"width": 275, "height": 23, "fill": "#FFFACD", "borderStyle": "solid", "fontFamily": "Monaco", "fontSize": 18, "textAlign": "center", "text": "Hello 4D Summit" } } 1 2 3 4 5 όΠφϦʔ͔ΒϓϩδΣΫτ ελΠϧγʔτΛ༻͠ͳ͍ΦϒδΣΫτ
"objects": { "Text": { "type": "text", "top": 24, "left": 23,
"width": 275, "height": 23, "fill": "#FFFACD", "borderStyle": "solid", "fontFamily": "Monaco", "fontSize": 18, "textAlign": "center", "text": "Hello 4D Summit" } } όΠφϦʔ͔ΒϓϩδΣΫτ ελΠϧγʔτΛ༻͠ͳ͍ΦϒδΣΫτ 1 2 3 4 5 ϓϩδΣΫτϞʔυͰͷϓϩύςΟϦετ
όΠφϦʔ͔ΒϓϩδΣΫτ ελΠϧγʔτΛ༻͢ΔΦϒδΣΫτ 1 2 3 4 5
1 2 3 4 5 όΠφϦʔ͔ΒϓϩδΣΫτ ελΠϧγʔτΛ༻͢ΔΦϒδΣΫτ "objects": { "Text":
{ "type": "text", "top": 79, "left": 23, "width": 275, "height": 25, "fill": "#008000", "borderStyle": "solid", "class": "HeaderStyle", "stroke": "#FFFFFF", "textAlign": "center", "text": "Hello 4D Developers" } }
3 όΠφϦʔ͔ΒϓϩδΣΫτ ελΠϧγʔτΛ༻͢ΔΦϒδΣΫτ "objects": { "Text": { "type": "text", "top":
79, "left": 23, "width": 275, "height": 25, "fill": "#008000", "borderStyle": "solid", "class": "HeaderStyle", "stroke": "#FFFFFF", "textAlign": "center", "text": "Hello 4D Developers" } } /* styleSheets_mac.css */ .HeaderStyle { font-family: Monaco; font-size: 18px; } ϓϩδΣΫτϞʔυͰͷϓϩύςΟϦετ
1 2 3 4 5 όΠφϦʔ͔ΒϓϩδΣΫτ ελΠϧγʔτΛ༻͢ΔΦϒδΣΫτ "objects": { "Text":
{ "type": "text", "top": 79, "left": 23, "width": 275, "height": 25, "fill": "#008000", "borderStyle": "solid", "class": "HeaderStyle", "stroke": "#FFFFFF", "textAlign": "center", "text": "Hello 4D Developers" } }
CSS ηϨΫλʔ
CSS ηϨΫλʔ • ελΠϧΛద༻͢ΔཁૉΛબ͢Δͷʹ༻͢Δύλʔϯ • 4D Ͱ5ͭͷηϨΫλʔΛαϙʔτ͍ͯ͠·͢: ElementɺIDɺClassɺUniversalɺAttributes
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ Element ID Class
Universal Attributes CSS 4D
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ 4D
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ 4D “button", "buttonGrid",
"checkbox", "combo", "dropdown", "groupBox", "input", "line", "list", "listbox", "oval", "picture", "pictureButton", "picturePopup", "plugin", "progress", "radio", "rectangle", "ruler", "spinner", "splitter", "stepper", "subform", "tab", "text", "view", "webArea", "write"
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ 4D text {
… } button { … } input { … }
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ 4D #myHeader {
… } #okButton { … } #nameInput { … }
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ 4D .header {
… } text.header { … } .default { … }
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ 4D * {
… }
CSS ηϨΫλʔ ΦϒδΣΫτͷλΠϓ ΦϒδΣΫτ໊ Ϋϥε શΦϒδΣΫτ ಛఆͷଐੑ 4D .buttonAction[action=accept] {
… } text[text=Hello] { … } text[text~=Hello] { … }
ద༻ͷ༏ઌॱҐ
ద༻ͷ༏ઌॱҐ ϑΝΠϧϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτఆٛ styleSheets_mac.css styleSheets_windows.css styleSheets.css 1 2 3 fontSize:
12 font-size: 14px; font-size: 18px; fontSize: 12 ࣮ࡍͷදࣔ
ద༻ͷ༏ઌॱҐ ϑΝΠϧϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτఆٛ styleSheets_mac.css styleSheets_windows.css styleSheets.css 1 2 3 font-size:
14px; font-size: 18px; font-size: 14px; ࣮ࡍͷදࣔ
ద༻ͷ༏ઌॱҐ ϑΝΠϧϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτఆٛ styleSheets_mac.css styleSheets_windows.css styleSheets.css 1 2 3 font-size:
18px; font-size: 18px; ࣮ࡍͷදࣔ
ద༻ͷ༏ઌॱҐ ηϨΫλʔϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτ໊ ಛఆͷଐੑ Ϋϥε 1 2 3 #myText {
font-size: 12px; text[text|=Hello] { font-size: 14px; .headerStyle { font-size: 18px; ΦϒδΣΫτఆٛ ΦϒδΣΫτͷܕ શΦϒδΣΫτ 4 5 text { font-size: 24px; * { font-size: 36px; "myText": { "type": "text", "class": "headerStyle", "text": "Hello 4D Summit" } font-size: 12px; ࣮ࡍͷදࣔ
ద༻ͷ༏ઌॱҐ ηϨΫλʔϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτ໊ ಛఆͷଐੑ Ϋϥε 1 2 3 text[text|=Hello] {
font-size: 14px; .headerStyle { font-size: 18px; ΦϒδΣΫτఆٛ ΦϒδΣΫτͷܕ શΦϒδΣΫτ 4 5 text { font-size: 24px; * { font-size: 36px; "myText": { "type": "text", "class": "headerStyle", "text": "Hello 4D Summit" } font-size: 14px; ࣮ࡍͷදࣔ
ద༻ͷ༏ઌॱҐ ηϨΫλʔϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτ໊ ಛఆͷଐੑ Ϋϥε 1 2 3 .headerStyle {
font-size: 18px; ΦϒδΣΫτఆٛ ΦϒδΣΫτͷܕ શΦϒδΣΫτ 4 5 text { font-size: 24px; * { font-size: 36px; "myText": { "type": "text", "class": "headerStyle", "text": "Hello 4D Summit" } font-size: 18px; ࣮ࡍͷදࣔ
ద༻ͷ༏ઌॱҐ ηϨΫλʔϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτ໊ ಛఆͷଐੑ Ϋϥε 1 2 3 ΦϒδΣΫτఆٛ ΦϒδΣΫτͷܕ
શΦϒδΣΫτ 4 5 text { font-size: 24px; * { font-size: 36px; "myText": { "type": "text", "class": "headerStyle", "text": "Hello 4D Summit" } font-size: 24px; ࣮ࡍͷදࣔ
ద༻ͷ༏ઌॱҐ ηϨΫλʔϨϕϧͰͷ༏ઌॱҐ ΦϒδΣΫτ໊ ಛఆͷଐੑ Ϋϥε 1 2 3 ΦϒδΣΫτఆٛ ΦϒδΣΫτͷܕ
શΦϒδΣΫτ 4 5 * { font-size: 36px; "myText": { "type": "text", "class": "headerStyle", "text": "Hello 4D Summit" } font-size: 36px; ࣮ࡍͷදࣔ
σβΠϯ্ͷ੍
σβΠϯ্ͷ੍ ϑΥʔϜͰCSSΛ༻͢ΔࡍʹؾΛ͚͍ͭͨ͜ͱ • CSSϑΥʔϜΤσΟλʔ্Ͱద༻͞Εͳ͍ • CSSͰͷఆٛɺϑΥʔϜ͕ϥϯλΠϜͰϩʔυ͞Ε ͨͱ͖ʹҰ͚ͩద༻͞ΕΔ • ϓϩύςΟϦετͰͷมߋશͯΦϒδΣΫτఆٛ ʹอଘ͞ΕɺCSSͰͷఆٛΑΓ༏ઌ͞ΕΔ
• CSSͷ༏ઌॱҐΛɺImportant λάΛ༻͢Δ͜ͱͰ ڧ੍తʹ্࣋ͪ͛Δ͜ͱ͕Մೳ
σϞϯετϨʔγϣϯ