code: private function createCSSStyleAlignment(Alignment $pStyle)
      {
          // Construct CSS
          $css = [];
  
          // Create CSS
          $css['vertical-align'] = $this->mapVAlign($pStyle->getVertical());
          if ($textAlign = $this->mapHAlign($pStyle->getHorizontal())) {
              $css['text-align'] = $textAlign;
              if (in_array($textAlign, ['left', 'right'])) {
                  $css['padding-' . $textAlign] = (string) ((int) $pStyle->getIndent() * 9) . 'px';
              }
          }
  
          return $css;
      }
docs: Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Alignment).
  
  @param Alignment $pStyle \PhpOffice\PhpSpreadsheet\Style\Alignment
  
  @return array