I가 다음 생성 ANF 문서 :스타일링
{
"version": "0.10.13",
"identifier": "http://test.domain.com?p=123456",
"title": "Test Apple News Post",
"language": "en",
"layout": {
"columns": 7,
"width": 1024
},
"components": [
{
"text": "Test Apple News Post",
"role": "title",
"layout": {
"margin": {
"bottom": 30
}
}
},
{
"text": "# Heading 1\n\n## HEADING 2\n\n### Heading 3\n\n#### Heading 4\n\n##### Heading 5\n\n###### Heading 6",
"format": "markdown",
"role": "body",
"layout": "bodyLayout"
}
],
"componentTextStyles": {
"default": {
"linkStyle": {
"textColor": "#DF0033"
},
"fontName": "Georgia",
"fontSize": 12
},
"default-title": {
"fontName": "Georgia-Bold",
"fontSize": 24
},
"default-heading": {
"fontName": "Georgia-Bold",
"fontSize": 24
},
"default-heading1": {
"fontName": "Georgia-Bold",
"fontSize": 24
},
"default-heading2": {
"fontName": "DINCondensed-Bold",
"fontSize": 18
},
"default-heading3": {
"fontName": "Georgia-Bold",
"fontSize": 22,
"textColor": "#FF0000"
},
"default-heading4": {
"fontName": "Georgia-Bold",
"fontSize": 20,
"textColor": "#00FF00"
},
"default-heading5": {
"fontName": "Georgia-Bold",
"fontSize": 18,
"textColor": "#0000FF"
},
"default-heading6": {
"fontName": "Georgia-Bold",
"fontSize": 16,
"textColor": "#FF00FF"
}
},
"metadata": {
"datePublished": "2016-06-06T04:25:34+00:00",
"dateCreated": "2016-06-06T04:25:34+00:00",
"dateModified": "2016-06-27T01:05:27+00:00",
"canonicalURL": "http://test.domain.com?p=123456",
"thumbnailURL": "http://dummyimage.com/1000x500/000/ffffff&text=Apple+News+Image+1",
"keywords": [
"tag1",
"tag2",
"tag3"
],
"excerpt": "This is the excerpt text, woo!"
},
"componentLayouts": {
"bodyLayout": {
"columnStart": 0,
"columnSpan": 7,
"margin": {
"bottom": 15
}
}
}
}
내 문제는 글꼴 크기가 6을 통해 제목 3에 적용되지 않습니다 것처럼이 지금까지의 내가 할 수있는, 보이는 것입니다 텔.
내가 얻기 위해 노력하고 목표는 h1
이 h3
(문서의 title
구성 요소와 동일한 스타일) 조지아 굵게에 큰 제목이다이다 - h6
가 동일한의 점진적 작은 버전이, 그리고 h2
는이다 더 작고 응축 된 제목 스타일을 보여주는 특별한 경우. 나는 이것이 매우 간단 될 것으로 예상하지만, 여기 내 출력 :
당신이 볼 수 있듯이, 여기에서 일어나고있는 몇 가지 이상한 일들이 있습니다 :
- 이 분명
fontName
속성이 포착되고있다default-heading2
에서부터 우리가 거기에서 사용 된 응축 된 글꼴을 보았을 때 textColor
속성을 추가 했으므로default-heading3
-default-heading6
이 전혀 수행되지 않고 적용되도록했습니다.- 적어도
h2
에있는fontSize
속성이 선택되었지만 확실하지는 않습니다. 아마도 글꼴 자체의 크기 차이 일 수 있습니다.
나는이 이상한 상속 것은 일종의 될 수 있다는 생각에, 전체 default-heading
componentTextStyle
제거했지만, 변화를 본 적이있다.
편집 : 또한, 나는 루트 요소에 componentTextStyle
년대의 전체 순서를 반대로 해봤 (default-heading6
있도록 다음, default-heading5
등 뒤에 먼저 정의 default-heading1
후, 마지막으로 default-heading
정의된다), 또한 미리보기 응용 프로그램에서 생성 된 경고를 기반으로 루트 요소의 version
속성을 1.1.0으로 늘렸습니다. 이들 중 어느 것도 출력을 변경하지 않았습니다.