Skip to content

Commit

Permalink
major cleanup, corrected prefixes scope, rename syntax file into css3…
Browse files Browse the repository at this point in the history
…, easier installation
  • Loading branch information
i-akhmadullin committed Jan 26, 2013
1 parent d7cef86 commit baa90c7
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 69 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.cache
81 changes: 54 additions & 27 deletions CSS.tmLanguage → CSS3.tmLanguage
Expand Up @@ -16,7 +16,7 @@
<key>keyEquivalent</key>
<string>^~C</string>
<key>name</key>
<string>CSS</string>
<string>CSS3</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -526,18 +526,25 @@
<array>
<dict>
<key>match</key>
<string>\b(absolute|all(-scroll)?|always|armenian|auto|avoid|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|geometricPrecision|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|optimize(Legibility|Quality|Speed)|outset|outside|overline|pointer|pre(-(wrap|line))?|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|sub|super|sw-resize|table(-footer-group|-header-group|-cell)?|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical(-(ideographic|text))?|visible(Painted|Fill|Stroke)?|w-resize|wait|whitespace|zero|smaller|larger|((xx?-)?(small|large))|painted|fill|stroke|
<string>\b(absolute|all(-scroll)?|always|armenian|auto|avoid|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|geometricPrecision|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|optimize(Legibility|Quality|Speed)|outset|outside|overline|pointer|pre(-(wrap|line))?|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|sub|super|sw-resize|table(-footer-group|-header-group|-cell|-caption|-column-group|-column|-row-group|-row)?|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical(-(ideographic|text))?|visible(Painted|Fill|Stroke)?|w-resize|wait|whitespace|zero|smaller|larger|((xx?-)?(small|large))|painted|fill|stroke|
|bicubic|
|border-box|padding-box|border-box|content-box|
|padding|border|content|infinite|ellipse|
|webkit-gradient|(webkit-|moz-|ms-|o-)?(radial-gradient|transform|linear-gradient)|
|webkit-gradient|
|(webkit-|moz-|ms-|o-)?radial-gradient|
|(webkit-|moz-|ms-|o-)?repeating-radial-gradient|
|(webkit-|moz-|ms-|o-)?linear-gradient|
|(webkit-|moz-|ms-|o-)?repeating-linear-gradient|
|(webkit-|moz-|ms-|o-)?transform|
|linear|
|translate(X|Y|Z|3d)|
|rotate(X|Y|Z|3d)|
|scale(X|Y|Z|3d)|
|color-stop|
|translate(X|Y|Z|3d)?|
|rotate(X|Y|Z|3d)?|
|matrix(3d)?|
|scale(X|Y|Z|3d)?|
|skew(X|Y)?|
|preserve-3d|
|farthest-side|
|color-stop|
|textfield|
|antialiased|
|blink|
Expand All @@ -547,6 +554,7 @@
|progid:DXImageTransform.Microsoft.gradient|
|progid:DXImageTransform.Microsoft.Alpha|
|alpha|
|flex-start|flex-end|space-between|space-around|stretch|
|startColorStr|EndColorStr)\b</string>
<key>name</key>
<string>support.constant.property-value.css</string>
Expand Down Expand Up @@ -692,30 +700,49 @@
<array>
<dict>
<key>match</key>
<string>((-moz-|-webkit-)?appearance|
|(-webkit-|-moz-)?background-clip|
|(-moz-|-webkit-|-ms-|-o-)?animation(-duration|-delay|-name|-iteration-count|-fill-mode|-play-state|-timing-function)?|
|(-moz-|-webkit-|-ms-|-o-)?box(-shadow|-sizing)|
|(-moz-|-webkit-|-ms-|-o-)?border-(bottom-|top-)?(right-|left-)?radius(-bottomleft|-bottomright|-topleft|-topright)?|
|(-moz-|-webkit-|-ms-)?backface-visibility|
|(-moz-|-webkit-|-ms-|-o-)?transform(-style)?|
|(-webkit-|-moz-|-ms-|-o-)?transition(-delay|-duration|-property|-timing-function)?|
|(-moz-|-webkit-)?overflow-scrolling|
|(-moz-|-webkit-)?user-select|
|(-ms-|-o-)?text-overflow|
|-webkit-mask-(image|size|position)|
|(-webkit-|-moz-|-ms-)?perspective|
|(-webkit-)?font-smoothing|
|(-webkit-|-moz-)?hyphens|
|(-ms-)?filter|
|(-webkit-|-ms-)?text-size-adjust|
|-ms-interpolation-mode|behavior)\b</string>
<string>(-webkit-|-moz-|-ms-|-o-)</string>
<key>name</key>
<string>support.type.property-vendor.css</string>
</dict>
<dict>
<key>match</key>
<string>\b(azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|box-shadow|border-radius|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|image-rendering|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow(-[xy])?|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|src|stress|table-layout|text-(align|decoration|indent|rendering|shadow|transform)|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-(spacing|wrap)|zoom|z-index|text-justify)\b</string>
<string>\b(azimuth|
|appearance|
|align-items|
|align-content|
|align-self|
|animation(-delay|-direction|-duration|-fill-mode|-iteration-count|-name|-play-state|-timing-function)?|
|backface-visibility|
|background(-clip|-origin|-size)|
|behavior|
|border-(bottom-|top-)?(right-|left-)?radius(-bottomleft|-bottomright|-topleft|-topright)?|
|box-sizing|
|border-image(-outset|-repeat|-slice|-source|-width)?|
|column(-count|-fill|-gap|-rule|-rule-color|-rule-style|-rule-width|-span|-width)|
|columns|
|font-smoothing|
|flex(-basis|-direction|-flow|-grow|-shrink|-wrap)?|
|filter|
|hyphens|
|interpolation-mode|
|mask-(image|size|position)|
|overflow-scrolling|
|perspective|
|perspective-origin|
|text-size-adjust|
|text-overflow|
|transform|
|transform-origin|
|transform-style|
|transition|
|transition-delay|
|transition-duration|
|transition-property|
|transition-timing-function|
|user-select|
|clip-path|
|mask|
|background-attachment|background-color|background-image|background-position|background-repeat|background|box-shadow|border-radius|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|image-rendering|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow(-[xy])?|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|src|stress|table-layout|text-(align|decoration|indent|rendering|shadow|transform)|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-(spacing|wrap)|zoom|z-index|text-justify)\b</string>
<key>name</key>
<string>support.type.property-name.css</string>
</dict>
Expand Down Expand Up @@ -816,7 +843,7 @@
<key>match</key>
<string>(:+)(after|before|first-letter|first-line|
|(-moz-)?selection|
|-moz|((-webkit|-ms)-input-)?placeholder|
|(-moz-|((-webkit|-ms)-input-))?placeholder|
|-webkit-search-(cancel-button|decoration)|
|-moz-focus-inner)\b</string>
<key>name</key>
Expand Down
137 changes: 95 additions & 42 deletions README.md
Expand Up @@ -20,60 +20,113 @@ After:

Adds several missing (mostly CSS3) features into sublime text 2 css parsing:

### Property names
### Property names (prefixes omitted):
```
appearance, moz-appearance, webkit-appearance
animation, moz-animation, webkit-animation
animation-name, moz-animation-name, webkit-animation-name
animation-delay, moz-animation-delay, webkit-animation-delay
animation-duration, moz-animation-duration, webkit-animation-duration
animation-iteration-count, moz-animation-iteration-count, webkit-animation-iteration-count
box-shadow, moz-box-shadow, webkit-box-shadow, ms-box-shadow,
box-sizing, moz-box-sizing, webkit-box-sizing, ms-box-sizing,
border-radius, moz-border-radius, webkit-border-radius
backface-visibility, webkit-backface-visibility, moz-backface-visibility, ms-backface-visibility
transform, moz-transform, webkit-transform, ms-transform
transform-style, moz-transform-style, webkit-transform-style, ms-transform-style
transition, webkit-transition, moz-transition, ms-transition
transition-delay, moz-transition-delay, webkit-transition-delay, ms-transition-delay
transition-duration, moz-transition-duration, webkit-transition-duration, ms-transition-duration
transition-property, moz-transition-property, webkit-transition-property, ms-transition-property
overflow-scrolling, moz-overflow-scrolling, webkit-overflow-scrolling
user-select, moz-user-select, webkit-user-select
appearance
align-items
align-content
align-self
animation
animation-delay
animation-duration
animation-iteration-count
animation-fill-mode
animation-name
animation-play-state
animation-timing-function
background-clip
background-origin
background-size
border-image
border-image-outset
border-image-repeat
border-image-slice
border-image-source
border-image-width
box-shadow
box-sizing
border-radius
columns
column-count
column-fill
column-gap
column-rule
column-rule-color
column-rule-style
column-rule-width
column-span
column-width
flex
flex-basis
flex-direction
flex-flow
flex-grow
flex-shrink
flex-wrap
backface-visibility
perspective
perspective-origin
transform
transform-style
transform-origin
transition
transition-delay
transition-duration
transition-property
transition-timing-function
hyphens
overflow-scrolling
text-size-adjust
text-overflow
clip-path
mask
filter
user-select
webkit-mask-image, webkit-mask-size, webkit-mask-position
perspective, webkit-perspective, moz-perspective, ms-perspective
font-smoothing, webkit-font-smoothing
behavior
interpolation-mode
```

### Property values

### Property values (prefixes omitted):
```
bicubic
border-box, padding-box, border-box, content-box
table-cell
infinite
ellipse
linear
table-cell, table-caption, table-column-group, table-column, table-row-group, table-row
linear
infinite
webkit-gradient
radial-gradient, webkit-radial-gradient, moz-radial-gradient, ms-radial-gradient
transform, webkit-transform, moz-transform, ms-transform
linear-gradient , webkit-linear-gradient, moz-linear-gradient, ms-linear-gradient
radial-gradient
repeating-radial-gradient
linear-gradient
repeating-linear-gradient
translateZ, rotateY, scaleX, preserve-3d, translate
rotate, farthest-side, color-stop, scale
ease-in-out, ease-out, from, to
flex-start, flex-end, space-between, space-around, stretch
textfield
transform, translate, rotate, scale, matrix, skew,
farthest-side, color-stop, preserve-3d, ellipse
ease-in-out, ease-in, ease-out, from, to
content
antialiased
blink
textfield
touch
progid:DXImageTransform.Microsoft.Alpha, alpha
progid:DXImageTransform.Microsoft.gradient, startColorStr, EndColorStr
```

Expand All @@ -86,11 +139,11 @@ selection, -moz-selection
-moz-focus-inner
```

### Tag: svg
### Tags: svg


## Installation:
## Installation (with Package Control):

1. Open `Preferences``Browse Packages...``CSS`
1. Ctrl+Shift+P → Package Control: Add Repository → https://github.com/i-akhmadullin/Sublime-CSS3

2. Backup CSS.tmLanguage then replace with CSS.tmLanguage from this repository.
2. (in .css file) View → Syntax → Open all with current extension as... → CSS3
78 changes: 78 additions & 0 deletions test.css
@@ -0,0 +1,78 @@
.button {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background: -webkit-linear-gradient(#eaf2f6 0, #e0ebf1 25%, #cfdeea 50%, #b8cfdb 75%, #a8c6d8 100%);
background: -moz-linear-gradient(#eaf2f6 0, #e0ebf1 25%, #cfdeea 50%, #b8cfdb 75%, #a8c6d8 100%);
background: -ms-linear-gradient(#eaf2f6 0, #e0ebf1 25%, #cfdeea 50%, #b8cfdb 75%, #a8c6d8 100%);
-webkit-box-shadow: inset 0 1px 2px rgba(20, 60, 75, 0.7), 0 1px 0 rgba(255, 255, 255, 0.65);
-moz-box-shadow: inset 0 1px 2px rgba(20, 60, 75, 0.7), 0 1px 0 rgba(255, 255, 255, 0.65);
box-shadow: inset 0 1px 2px rgba(20, 60, 75, 0.7), 0 1px 0 rgba(255, 255, 255, 0.65);
-webkit-transform: translateZ(0);
border-image: none;
box-sizing: border-box;

display: table-cell;
display: table-caption;
display: inline-table;
display: table-column;
display: table-column-group;
display: table-footer-group;
display: table-header-group;
display: table-row;
display: table-row-group;

-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius-bottomright: 5px;
border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-left-radius: 5px;
}
input:placeholder {
position: absolute;
}
.button-name {
-webkit-mask-image: -webkit-linear-gradient(left, #000 0, #000 80%, rgba(0,0,0,0) 100%);
}
.participants {
-webkit-box-shadow: inset 2px 0 2px rgba(0,0,0,0.3);
-moz-box-shadow: inset 2px 0 2px rgba(0,0,0,0.3);
box-shadow: inset 2px 0 2px rgba(0,0,0,0.3);
}
.participants__avatar {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}

.participants__avatar:before {
-webkit-border-radius: inherit;
-moz-border-radius: inherit;
border-radius: inherit;
-webkit-box-shadow:
inset 0 1px 1px rgba(255,255,255,.75),
0 1px 0 rgba(0,0,0,.4);
-moz-box-shadow:
inset 0 1px 1px rgba(255,255,255,.75),
0 1px 0 rgba(0,0,0,.4);
box-shadow:
inset 0 1px 1px rgba(255,255,255,.75),
0 1px 0 rgba(0,0,0,.4);
}
.participants__avatar-img {
-webkit-border-radius: inherit;
-moz-border-radius: inherit;
}
.participants__title {
text-overflow: ellipsis;
}

0 comments on commit baa90c7

Please sign in to comment.