Sets style margin.

@param array|int $margin The margin value/s
978026
public function setMargin($margin = 0) {
		$margin = $this->parseSizes($margin);

		foreach ($margin as $side => $value) {
			if (! is_int($value) || $value < 0) {
				throw new InvalidArgumentException(sprintf(
					'Invalid %s margin: "%s". Must be a positive integer value.',
					$side, $value
				));
			}

			$this->margin[$side] = $value;
		}
	}
1155999
def set_top_margin(self, top_margin):
        
        self.__header.style.margins.top = top_margin
        return self
637438
public function setWidth($width)
    {
        $this->width = null;
        if ($width && is_numeric($width)) {
            $width = (int) $width;
            if ($width > 0) {
                $this->width = $width;
            }
        }
    }
1085773
def margin(self, value):
        

        if value is not None:
            assert type(value) is int, "'{0}' attribute: '{1}' type is not 'int'!".format("margin", value)
            assert value > 0, "'{0}' attribute: '{1}' need to be exactly positive!".format("margin", value)
        self.__margin = value
360424
public function setSeparator($separator)
    {
        if (!in_array(
            $separator,
            [
                ' ',
                '-'
            ],
            true
        )
        ) {
            $separator = ' ';
        }

        $this->separator = $separator;

        return $this;
    }
177683
public function setIndentStyle($indentStyle)
    {
        if (!in_array($indentStyle, [null, Lexer::INDENT_TAB, Lexer::INDENT_SPACE])) {
            throw new \InvalidArgumentException(
                'indentStyle needs to be null or one of the INDENT_* constants of the lexer'
            );
        }

        $this->indentStyle = $indentStyle;

        return $this;
    }
1310007
function(margin) {
      if (!this.length) {
        return 0;
      }
      return margin ? this[0].offsetHeight + parseInt(getComputedStyle(this[0]).marginTop) + parseInt(getComputedStyle(this[0]).marginBottom) : this[0].offsetHeight;
    }
178228
public function marginRight($margin = null)
    {
        if ($margin === null) {
            return $this->_marginRight;
        }
        $this->_marginRight = $margin;

        return $this;
    }
570450
function SetStyle($tag, $enable)
	{
		$this->$tag = $enable;
		$style = '';
		foreach (['B', 'I'] as $s) {
			if ($this->$s) {
				$style .= $s;
			}
		}
		$this->currentfontstyle = $style;
		$this->SetFont('', $style, 0, false);
	}
901047
def set(margins)
      margins.select do |k, v|
        next unless [:left, :right, :top, :bottom, :header, :footer].include? k
        send("#{k}=", v)
      end
    end
726393
protected function set_active_styles() {
		parent::set_active_styles();
		$style = '#control-' . $this->id() . '{border-color: ' . $this->base_color() . ';}';
		$style .= '#' . $this->id() . ' span.uix-control-label {color: ' . $this->base_color() . ';}';
		uix_share()->set_active_styles( $style );
	}
1256285
function($media) {
    var styles = window.getComputedStyle($media, null);
    var constraints = {
      "max-width":  "none",
      "max-height": "none",
      "min-width":  "0px",
      "min-height": "0px",
      "top": "auto",
      "right": "auto",
      "bottom": "auto",
      "left": "auto",
      "margin-top": "0px",
      "margin-right": "0px",
      "margin-bottom": "0px",
      "margin-left": "0px",
    };

    for (var property in constraints) {
      var constraint = styles.getPropertyValue(property);

      if (constraint !== constraints[property]) {
        $media.style[property] = constraints[property];
      }
    }
  }
6336
private void setTopMargin(final int margin) {
        FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) getLayoutParams();
        layoutParams.topMargin = margin;
        setLayoutParams(layoutParams);
    }
556231
function set_border_spacing($val)
    {
        $arr = explode(" ", $val);

        if (count($arr) == 1) {
            $arr[1] = $arr[0];
        }

        //see __set and __get, on all assignments clear cache, not needed on direct set through __set
        $this->_prop_cache["border_spacing"] = null;
        $this->_props["border_spacing"] = "$arr[0] $arr[1]";
    }
889303
public function setWidth($width) {
        if (!is_numeric($width) || $width <= 0) {
            return;
        }
        if ($width > self::MAX_WIDTH) {
            $this->_width = self::MAX_WIDTH;
        } else {
            $this->_width = (int)$width;
        }
    }
626475
public function style($style)
    {
        if (is_array($style)) {
            $style = implode('', array_map(function ($key, $val) {
                return "$key:$val";
            }, array_keys($style), array_values($style)));
        }

        if (is_string($style)) {
            $this->attributes['style'] = $style;
        }
    }
68701
function setBorder($style)
    {
        $this->setBottom($style);
        $this->setTop($style);
        $this->setLeft($style);
        $this->setRight($style);
    }