Lines Matching refs:attributes
62 * @param TagAttributes $attributes
64 public static function processWidthAndHeight(TagAttributes &$attributes)
66 self::processWidth($attributes);
69 if ($attributes->hasComponentAttribute($heightName)) {
70 $heightValue = trim($attributes->getValueAndRemove($heightName));
74 if (in_array($attributes->getLogicalTag(), self::NATURAL_SIZING_ELEMENT)) {
82 $attributes->addStyleDeclarationIfNotSet("max-height", $heightValue);
97 $attributes->addStyleDeclarationIfNotSet("height", $heightValue);
99 $scrollMechanism = $attributes->getValueAndRemoveIfPresent(Dimension::SCROLL);
106 $attributes->addStyleDeclarationIfNotSet("overflow-y", "hidden");
107 $attributes->addStyleDeclarationIfNotSet("position", "relative");
108 $attributes->addStyleDeclarationIfNotSet("display", "block");
110 $attributes->addStyleDeclarationIfNotSet("min-height", $heightValue);
111 if ($attributes->hasComponentAttribute("id")) {
112 $id = $attributes->getValue("id");
114 $id = $attributes->generateAndSetId();
126 $attributes->addClassName(StyleAttribute::addComboStrapSuffix($toggleOnClickId));
127 $attributes->addStyleDeclarationIfNotSet("cursor", "pointer");
148 $attributes->addHtmlAfterEnterTag($button);
153 $attributes->addStyleDeclarationIfNotSet("overflow", "auto");
165 $attributes->addStyleDeclarationIfNotSet("min-height", $heightValue);
239 private static function processWidth(TagAttributes $attributes)
241 $widthValueAsString = $attributes->getComponentAttributeValueAndRemoveIfPresent(self::WIDTH_KEY);
247 $logicalTag = $attributes->getLogicalTag();
274 $requestedMime = $attributes->getMime();
283 if ($attributes->hasComponentAttribute(self::HEIGHT_KEY)) {
284 $attributes->addStyleDeclarationIfNotSet("width", "auto");
295 $attributes->addStyleDeclarationIfNotSet('max-width', $conditionalWidthLength->toCssLength());
298 $attributes->addStyleDeclarationIfNotSet('max-width', $conditionalWidthLength->getLength());
300 $attributes->addStyleDeclarationIfNotSet('width', "100%");
312 $attributes->addClassName($conditionalWidthLength->toColClass());
319 $attributes->addStyleDeclarationIfNotSet('max-width', $conditionalWidthLength->toCssLength());
321 $attributes->setStyleDeclaration('width', 'auto');
324 $attributes->addStyleDeclarationIfNotSet('max-width', $conditionalWidthLength->getLength());