Function createFocusStyles

  • Create styles that look like an outline for the given selector.

    It is recommended to use the pseudo selector chain ":focus:focus-visible:not(:active)" to preventing clicking an element from creating focus styles in Chrome.

    Parameters

    • __namedParameters: {
          borderRadius?: number;
          elementBorderSize: number;
          outlineGap?: number;
          outlineWidth?: number;
          selector: string;
      }
      • OptionalborderRadius?: number
      • elementBorderSize: number

        ElementBorderSize here is used to fix the outline when the element these styles are attached to has a border. The dev must specify that border size here for the offsets to be calculated correctly.

      • OptionaloutlineGap?: number
      • OptionaloutlineWidth?: number
      • selector: string

    Returns any