view release on metacpan or search on metacpan
php/PHP_CodeSniffer/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php view on Meta::CPAN
public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
$prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true);
if ($tokens[$prev]['code'] !== T_STYLE) {
// The colon is not part of a style definition.
return;
}
if ($tokens[$prev]['content'] === 'progid') {
// Special case for IE filters.
return;
}
if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
$error = 'There must be no space before a colon in a style definition';
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before');
if ($fix === true) {
$phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
}
php/PHP_CodeSniffer/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php view on Meta::CPAN
* @return void
*/
public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
$next = $phpcsFile->findNext(T_STYLE, ($stackPtr + 1));
if ($next === false) {
return;
}
if ($tokens[$next]['content'] === 'progid') {
// Special case for IE filters.
return;
}
if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) {
$error = 'Each style definition must be on a line by itself';
$fix = $phpcsFile->addFixableError($error, $next, 'Found');
if ($fix === true) {
$phpcsFile->fixer->addNewlineBefore($next);
}
php/PHP_CodeSniffer/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php view on Meta::CPAN
}
if ($tokens[$i]['code'] === T_STYLE) {
$inStyle = $tokens[$i]['content'];
}
if ($tokens[$i]['code'] === T_SEMICOLON) {
$inStyle = null;
}
if ($inStyle === 'progid') {
// Special case for IE filters.
continue;
}
if ($tokens[$i]['code'] === T_STYLE
|| ($inStyle !== null
&& $tokens[$i]['code'] === T_STRING)
) {
$expected = strtolower($tokens[$i]['content']);
if ($expected !== $tokens[$i]['content']) {
php/PHP_CodeSniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css view on Meta::CPAN
}
/* checking embedded PHP */
li {
background:url(<?php print $staticserver; ?>/images/<?php print $staticdir; ?>/bullet.gif) left <?php print $left; ?>px no-repeat;
margin:0px;
padding-left:10px;
margin-bottom:<?php echo $marginBottom; ?>px;
margin-top: <?php echo $marginTop; ?>px;
line-height:13px;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363);
}
/* Empty style defs. */
.p {
margin:;
margin-right:
margin-left: 10px;
float:/* Some comment. */ ;
}
php/PHP_CodeSniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css.fixed view on Meta::CPAN
}
/* checking embedded PHP */
li {
background: url(<?php print $staticserver; ?>/images/<?php print $staticdir; ?>/bullet.gif) left <?php print $left; ?>px no-repeat;
margin: 0px;
padding-left: 10px;
margin-bottom: <?php echo $marginBottom; ?>px;
margin-top: <?php echo $marginTop; ?>px;
line-height: 13px;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363);
}
/* Empty style defs. */
.p {
margin:;
margin-right:
margin-left: 10px;
float: /* Some comment. */ ;
}
php/PHP_CodeSniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css view on Meta::CPAN
.SettingsTabPaneWidgetType-tab-mid {
background: transparent url(tab_inact_mid.png) repeat-x;
height: 100%;float: left;
line-height: -25px;
cursor: pointer; margin: 10px; float: right;
}
/* testing embedded PHP */
li {
background:url(<?php print $staticserver; ?>/images/<?php print $staticdir; ?>/bullet.gif) left <?php print $left; ?>px no-repeat; margin:0px; padding-left:10px; margin-bottom:<?php echo $marginBottom; ?>px; line-height:13px;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363);
}
/* Document handling of comments and annotations. */
div#annotations {-webkit-tap-highlight-color:transparent;/* phpcs:disable Standard.Cat.SniffName */-webkit-touch-callout:none;/*phpcs:enable*/-webkit-user-select:none;}
div#comments {height:100%;/*comment*/width:100%;}
php/PHP_CodeSniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css.fixed view on Meta::CPAN
float: right;
}
/* testing embedded PHP */
li {
background:url(<?php print $staticserver; ?>/images/<?php print $staticdir; ?>/bullet.gif) left <?php print $left; ?>px no-repeat;
margin:0px;
padding-left:10px;
margin-bottom:<?php echo $marginBottom; ?>px;
line-height:13px;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363);
}
/* Document handling of comments and annotations. */
div#annotations {-webkit-tap-highlight-color:transparent;/* phpcs:disable Standard.Cat.SniffName */
-webkit-touch-callout:none;/*phpcs:enable*/
-webkit-user-select:none;}
div#comments {height:100%;/*comment*/
width:100%;}
php/PHP_CodeSniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.css view on Meta::CPAN
font-family: Arial;
Font-Family: arial;
background-color: #DA9393;
BACKGROUND-IMAGE: URL(Warning_Close.png);
}
@media screen and (max-device-width: 769px) {
.SettingsTabPaneWidgetType-tab-mid {
Font-Family: arial;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363);
}
}